Note that there are some explanatory texts on larger screens.

plurals
  1. POBigQuery - UNION on left side of JOIN == Unexpected. Please try again
    primarykey
    data
    text
    <p>I have a problem with this query:</p> <pre><code>select sviEventoviFull.site_sectionid as site_sectionid, sviEventoviFull.ev_date as ev_date, sum(sviEventoviFull.total_views) as actualTotalViews, sum(sviEventoviFull.total_visits) as actualTotalVisits, sum(sviEventoviFull.total_time) as actualTotalTime, sum(sviEventoviFull.realUserCount) as actualRealUserCount from (select userid,site_sectionid, ev_date, total_views, total_visits, total_time, 1 as realUserCount from DotMetric_TEST.EV_03112012, DotMetric_TEST.EV_04112012) as sviEventoviFull join ( select userid from DotMetric_TEST.UserSettings where q1=100 and q2=213 and geo_code in (7,6,1,2) ) as patternTablica on sviEventoviFull.userid =patternTablica.userid where sviEventoviFull.site_sectionid in (1,2,3,4,5,6,7,8,11,123) group by site_sectionid,ev_date </code></pre> <p>It keeps telling me "Error: Unexpected. Please try again.".</p> <p>Same query without UNION works as expected:</p> <pre><code>select sviEventoviFull.site_sectionid as site_sectionid, sviEventoviFull.ev_date as ev_date, sum(sviEventoviFull.total_views) as actualTotalViews, sum(sviEventoviFull.total_visits) as actualTotalVisits, sum(sviEventoviFull.total_time) as actualTotalTime, sum(sviEventoviFull.realUserCount) as actualRealUserCount from (select userid,site_sectionid, ev_date, total_views, total_visits, total_time, 1 as realUserCount from DotMetric_TEST.EV_03112012) as sviEventoviFull join ( select userid from DotMetric_TEST.UserSettings where q1=100 and q2=213 and geo_code in (7,6,1,2) ) as patternTablica on sviEventoviFull.userid =patternTablica.userid where sviEventoviFull.site_sectionid in (1,2,3,4,5,6,7,8,11,123) group by site_sectionid,ev_date </code></pre> <p>Please help us with this and how to use UNION and JOIN together. UNION on left side of join should be very common request!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload