I have this SQL I'm using with amazon redshift that errors out on the second select statement despite both queries being valid without a union:

```
select p.date,
       sum(p.pageviews) as "total_pageviews",
       sum(p.sessions)  as "total_sessions",
       l.location_id,
       p.brand_key
from public.local_site_sessions p, public.location_map l
where l.affiliate_id = p.affiliate_id
group by p.date, p.brand_key, l.location_id order by p.date

union

select g.date,
       g.sessions as "total_pageviews",
       g.pages_per_session as "total_sessions",
       g.location_id,
       brand_key
from public.ga_lead g
group by g.date, g.brand_key, g.location_id, g.sessions, g.pages_per_session    
order by g.date

```

The error says the second select statement is a syntax error? How can I correct this query?