Big query: LEFT OUTER JOIN cannot be used without a condition that is an equality of fields from both sides of the join

后端 未结 1 527
渐次进展
渐次进展 2021-01-29 05:13

Help, please. I created the next query but gen issue and I don`t understand how to fix it enter image description here

SELECT
tb1.*
FROM
(SELECT
tb1.date,
  clie         


        
1条回答
  •  伪装坚强ぢ
    2021-01-29 05:34

    Below is for BigQuery Standard SQL

    #standardSQL
    SELECT * EXCEPT(flag)
    FROM (
      SELECT
        tb1.date,
        clientId,
        REGEXP_EXTRACT (hits.pagePath,"^([^\?]+)\?")  AS page_url,
        hits.type AS type,
        hits.eventInfo.eventCategory AS eventCategory,
        hits.eventInfo.eventAction AS eventAction,
        hits.eventInfo.eventLabel AS person_email,
        COUNTIF(type = "pageview") OVER(ORDER BY `date`) AS flag
      FROM `table` AS tb1, 
      UNNEST (hits) AS hits
    )
    WHERE type = "pageview" OR (
      eventCategory = "Enroll_Free_lecture" 
      AND flag > 0
    )
    

    0 讨论(0)
提交回复
热议问题