Spaces:
Runtime error
Runtime error
#standardSQL | |
SELECT | |
COUNT(*) AS num_downloads, | |
DATE_TRUNC(DATE(timestamp), DAY) AS `day` | |
FROM `bigquery-public-data.pypi.file_downloads` | |
WHERE | |
file.project = '<PROJECT_NAME>' | |
AND DATE(timestamp) | |
BETWEEN DATE_TRUNC(DATE_SUB(CURRENT_DATE(), INTERVAL 18 MONTH), MONTH) | |
AND CURRENT_DATE() | |
GROUP BY `day` | |
ORDER BY `day` DESC |