Skip to content

Instantly share code, notes, and snippets.

@LNA
Last active August 29, 2015 14:18
Show Gist options
  • Save LNA/18a026cca6a3065d70ae to your computer and use it in GitHub Desktop.
Save LNA/18a026cca6a3065d70ae to your computer and use it in GitHub Desktop.
Query An Attribute PostgreSQL
select distinct(column_name) from table_name order by column_name ASC;
select * from table_name where query = "SOME QUERY" order by created_at_desc limit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment