Skip to content

Instantly share code, notes, and snippets.

@ashutoshpw
Created April 4, 2020 20:31
Show Gist options
  • Save ashutoshpw/1f8339c41eba0322f0bfd481c78dee26 to your computer and use it in GitHub Desktop.
Save ashutoshpw/1f8339c41eba0322f0bfd481c78dee26 to your computer and use it in GitHub Desktop.
mysql_queries_for_analytics
# Select Count for each Day
SELECT DATE(created_at) Date, COUNT(DISTINCT id) totalCOunt
FROM table_name
GROUP BY DATE(created_at)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment