$query = "SELECT DISTINCT 필드명 FROM 테이블";
select * from [테이블명] where [컬럼명] not in('조건1', '조건2', ... ); 예제 ) select * from USERS where userId not in('1', '2'. '3'); : userId가 1, 2, 3인 것만 제외하고 select. 출처 - https://giyatto.tistory.com/85