Skip to content

Commit

Permalink
Update SQL query for prev 7 days
Browse files Browse the repository at this point in the history
  • Loading branch information
ninadicara committed Aug 13, 2021
1 parent 39e5894 commit 923cc0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/datasets/live.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@
FROM tweets
JOIN places ON tweets.place_id = places.id
JOIN matchedplaces ON matchedplaces.place_id = places.id
WHERE strftime("%Y-%m-%d %H:%M:%S", tweets.created_at) > date('now','start of day','-7 days')
GROUP BY tweets.author_id,matchedplaces.lsoa
) as A
) as lastweek_tweets
GROUP BY lsoa;
"""

Expand Down

0 comments on commit 923cc0e

Please sign in to comment.