Tag

Queries

SQL differences

DISTINCT ON Works on PostgreSQL Only

DISTINCT ON (customer_id) is a neat way to keep each customer’s latest order on PostgreSQL, and none of the other three engines has it. SQLite, MySQL and MariaDB report a …

SQL differences

PostgreSQL Refuses Select List Names in HAVING

A report of repeat customers names its count of orders n in the select list and filters on that name in HAVING. SQLite, MySQL and MariaDB run it, and PostgreSQL refuses …