Tags / sql-order-by
SELECT DISTINCT ON (label) * FROM products ORDER BY label, created_at DESC;
How to Create Rows for 5 Higher and Lower Entries with Closest Matching Values in Same Table in SQL
How to Order Results without Selecting Individual Columns Used in String Aggregation Functions in PostgreSQL