How to retrieve number of tags at a certain time in the past

我的未来我决定 提交于 2019-12-14 03:25:11

问题


I can see here how to get number of tags through StackExchange API. Is it possible to get number of tags at a certain time in the past?

How can I run https://api.stackexchange.com/2.2/tags?order=desc&sort=popular&inname=java&site=stackoverflow with BigQuery?


回答1:


One of potentially many options - for 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


来源:https://stackoverflow.com/questions/45572529/how-to-retrieve-number-of-tags-at-a-certain-time-in-the-past

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!