如何在过去的某个时间检索标签数量

时间:2017-08-08 15:35:14

标签: google-bigquery stackexchange-api stackexchange

我可以看到here如何通过StackExchange API获取标签数量。是否有可能在过去的某个时间获得标签数量?

如何使用https://api.stackexchange.com/2.2/tags?order=desc&sort=popular&inname=java&site=stackoverflow运行BigQuery

1 个答案:

答案 0 :(得分:1)

BigQuery Standard SQL的潜在选项之一

  
#standardSQL
SELECT tag, COUNT(1) AS popular
FROM `bigquery-public-data.stackoverflow.stackoverflow_posts`, 
    UNNEST(SPLIT(tags, '|')) AS tag
WHERE DATE(creation_date) 
    BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 3 YEAR) 
    AND DATE_SUB(CURRENT_DATE(), INTERVAL 2 YEAR)
GROUP BY tag
HAVING tag LIKE '%java%'
ORDER BY popular DESC
-- LIMIT 100