Skip to content

Instantly share code, notes, and snippets.

@marshallm
Created June 18, 2014 14:09
Show Gist options
  • Select an option

  • Save marshallm/39ebd9ce930f62d13bf1 to your computer and use it in GitHub Desktop.

Select an option

Save marshallm/39ebd9ce930f62d13bf1 to your computer and use it in GitHub Desktop.
SELECT field_name,
field_name1,
field_name2
FROM table_name
WHERE field_name IN (select field_name from table_name where field_name = field_name)
GROUP BY 1,2
ORDER BY 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment