Postgres SELECT DISTINCT, only highest values
37901
Select first row in each GROUP BY group?
86649
What's the most efficient way to select the last n rows in a table without changing the table's structure?
83264
Get Max value and corresponding column
57566
SQL to find the number of distinct values in a column
96534
Efficiently select beginning and end of multiple contiguous ranges in Postgresql query
84729
Select longest continuous sequence
67770
MySQL: Count the distinct rows per day
50577
hierarchical retreival of records in postgresql
100486
How to select unique records by SQL
99544
postgres: index to SELECT strings like '%foo%';
47514
How can I select rows from a hierarchical query with the lowest level?
6884
Select values that meet different conditions on different rows?
123965
Why isn't oracle using an index for distinct query ?
23997
How do I order by multiple columns in a SELECT query?
19053
SQL query: Delete all records from the table except latest N?
39628
SQL select only rows with max value on a column
25114
MYSQL sum() for distinct rows