How to retrieve number of tags at a certain time i

2019-09-20 15:12发布

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条回答
等我变得足够好
2楼-- · 2019-09-20 15:34

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
查看更多
登录 后发表回答