我在下面的大查询中有两个表是每个\
的图像表示我想要的是通过对相应的Land URL进行分组来总计点击次数。下面是我正在使用的查询,但它没有返回任何结果
Select a.quarters as Quarters, sum(b.clicks) as Clicks
from `spreadsheetapi-1147.FlosportsDatabase.GroupByColumnReference` as a
inner join `spreadsheetapi-1147.FlosportsDatabase.kenshoo` as b
on lower(a.quarters) like concat('%' , b.land_url , '%' )
group by a.quarters
答案 0 :(得分:3)
切换lower(a.quarters)
和b.land_url
进行LIKE检查
Select a.quarters as Quarters, sum(b.clicks) as Clicks
from `spreadsheetapi-1147.FlosportsDatabase.GroupByColumnReference` as a
inner join `spreadsheetapi-1147.FlosportsDatabase.kenshoo` as b
on b.land_url like concat('%' , lower(a.quarters) , '%' )
group by a.quarters