[sql] SQL distinct for 2 fields in a database