buschbirk / intro-data-capstone-musclehub

0 stars 0 forks source link

You could also have done this in the SQL query #4

Closed hillarygreenlerman closed 6 years ago

hillarygreenlerman commented 6 years ago

https://github.com/buschbirk/intro-data-capstone-musclehub/blob/66253a292dbe1c2e164ec5b57ff40c1a6da26ecf/Final%20Analysis/musclehub.py#L134

You could have restricted the date range as part of your SQL query. For relatively small datasets this doesn't really matter. For larger datasets, you'll want to do your restrictions in SQL so that you download as little data as possible.

Here's an example of the WHERE statement that would have restricted the date range:

WHERE visits.visit_date >= '7-1-17'