且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

GDELT:计算特定主题的出现次数

更新时间:2022-12-10 10:21:18

下面是BigQuery标准SQL

Below is for BigQuery Standard SQL

#standardsql
select date(_partitiontime) date, count(theme) occurences
from `gdelt-bq.gdeltv2.gkg_partitioned`, unnest(split(themes,';')) as theme 
where _partitiontime >= "2020-11-01 00:00:00" and _partitiontime < "2020-11-07 00:00:00" 
and lower(theme) like "%bitcoin%"
group by date
-- order by date  

有输出