Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Github 如何查询GHTorrent(类似SQL的语言)的国家/城市/用户编号/存储库编号?_Github_Google Bigquery - Fatal编程技术网

Github 如何查询GHTorrent(类似SQL的语言)的国家/城市/用户编号/存储库编号?

Github 如何查询GHTorrent(类似SQL的语言)的国家/城市/用户编号/存储库编号?,github,google-bigquery,Github,Google Bigquery,我已经阅读了大量关于GitHub数据检索的文档,并通过BiGQuery查看了GitHub用户提交/推送数据,但没有找到城市、国家字段,也没有找到关于此类查询的任何描述。尽管有信息表明这种查询在理论上是可能的-。但这需要蔚蓝的湖水。有人知道如何通过/My_SQL/Postgres/BigQuery/或任何类似python-Jupiter-SQL的函数查询Github数据吗?例如,带有国家和城市字段的pandas-DataFrames 我喜欢这个例子 挑选 城市,国家, 总数 从…起 ghtorr

我已经阅读了大量关于GitHub数据检索的文档,并通过BiGQuery查看了GitHub用户提交/推送数据,但没有找到城市、国家字段,也没有找到关于此类查询的任何描述。尽管有信息表明这种查询在理论上是可能的-。但这需要蔚蓝的湖水。有人知道如何通过/My_SQL/Postgres/BigQuery/或任何类似python-Jupiter-SQL的函数查询Github数据吗?例如,带有国家和城市字段的pandas-DataFrames

我喜欢这个例子

挑选 城市,国家, 总数 从…起 ghtorrent-bq.ght.committes 分组 国家、地区 订购人 总说明 限度 10000 .......
塔克斯

下面应该是BigQuery标准SQL的良好起点

SELECT city, country_code, count(*) AS total 
FROM `ghtorrent-bq.ght.commits` AS c
JOIN `ghtorrent-bq.ght.users` AS u
ON c.Committer_Id = u.id
WHERE NOT u.fake 
GROUP BY country_code, city 
ORDER BY total DESC 
LIMIT 10000