Created
October 23, 2020 18:41
-
-
Save nfarah86/52754379f36add4526960082f19f6ea3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT CAST(d.day AS string) as "day", | |
SUM(d.steps) as "steps" | |
FROM production.daily_steps d | |
JOIN production.users u | |
ON d.userId = u._id | |
WHERE | |
d.day >= PARSE_DATE_ISO8601('2020-09-09') AND | |
d.day <= PARSE_DATE_ISO8601('2020-09-13') AND | |
u.appType = 3 | |
AND (u.subSegmentId = 1914) | |
AND d.userId = '1' | |
GROUP BY d.day | |
ORDER BY day |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment