sql exclude duplicates and find even id code example Example: sql exclude duplicates and find even id SELECT DISTINCT city FROM tablename WHERE id % 2 = 0