반응형 distinct mysql1 [MySQL] Weather Observation Station 3 ▶ SQL > Basic Select > Weather Observation Station 3 Problem Query a list of CITY names from STATION for cities that have an even ID number. Print the results in any order, but exclude duplicates from the answer. → 중복X The STATION table is described as follows: My Answer SELECT DISTINCT CITY FROM STATION WHERE ID % 2 = 0 NOTE DISTINCT : unique한 컬럼이나 튜플을 조회하는 경우 사용 정렬하지 않고 결과를 가져옴 GROUP BY에 비해 성능.. 2021. 3. 30. 이전 1 다음 반응형