3 Matching Annotations
- Last 7 days
-
stackoverflow.com stackoverflow.com
-
ELECT DISTINCT ON (customer) id, customer, total FROM purchases ORDER BY customer, total DESC, id;
-
-
- Jun 2021
-
dba.stackexchange.com dba.stackexchange.com
-
Careful, Instead of != you may need to IS DISTINCT FROM operator which also compares NULL value
-