How to select distinct multiple columns in MySQL and Oracle database?
(Also works with PostgreSQL)