Skip to content

Instantly share code, notes, and snippets.

@mattm
Created May 15, 2018 13:00
Show Gist options
  • Select an option

  • Save mattm/b73ca7abdefab8344458d908b3c2dbc3 to your computer and use it in GitHub Desktop.

Select an option

Save mattm/b73ca7abdefab8344458d908b3c2dbc3 to your computer and use it in GitHub Desktop.
Problematic Query
SELECT
current_url,
MIN(TIMESTAMP_TRUNC(time, DAY)) AS published_at
FROM mp.event
WHERE
current_url like "https://www.helpscout.net/blog/%"
GROUP BY 1
HAVING
COUNT(*) > 200 AND
MIN(time) >= "2018-04-04"
ORDER BY 2 DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment