我想在GDELT Google大查询数据集上运行一些简单的查询:
https://bigquery.cloud.google.com/table/gdelt-bq:full.events
查询例如:
SELECT year,
actor1name,
actor2name,
count
FROM (
SELECT actor1name,
actor2name,
year,
Count(*) count,
Rank() OVER(partition BY year ORDER BY count DESC) rank
FROM (
SELECT actor1name,
actor2name,
year
FROM [gdelt-bq:full.events]
WHERE actor1name < actor2name
AND actor1countrycode != ''
AND actor2countrycode != ''
AND actor1countrycode!=actor2countrycode),
(
SELECT actor2name actor1name,
actor1name actor2name,
year
FROM [gdelt-bq:full.events]
WHERE actor1name > actor2name
AND actor1countrycode != ''
AND actor2countrycode != ''
AND actor1countrycode!=actor2countrycode),
where Actor1Name is NOT NULL
AND actor2name IS NOT NULL GROUP each BY 1,
2,
3
HAVING count > 100 )
WHERE rank=1
ORDER BY year
当我在Google大查询的查询框中运行此内容时(通过复制和粘贴以及上面的链接),我得到了结果,一切都很好。现在我的问题是我需要在C#中使用这些结果,比如简单地将年份和国家打印到控制台。
我在这里找到了一些例子,但我知道C#非常少。有人可以告诉我从头开始做什么来打印这些结果吗?