DISTINCT, WHERE, AND, OR, NOT in MYSql