Skip to content

Instantly share code, notes, and snippets.

@seivan
Created September 17, 2010 15:12
Show Gist options
  • Select an option

  • Save seivan/584371 to your computer and use it in GitHub Desktop.

Select an option

Save seivan/584371 to your computer and use it in GitHub Desktop.
SELECT favorites.id, drink_id, count(*) as count
FROM favorizations, favorites
where favorites.id = favorites_id
group by favorites_id
limit 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment