반응형 CODING TEST32 [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. [MySQL] Weather Observation Station 1 ▶ SQL > Basic Select > Weather Observation Station 1 Problem Query a list of CITY and STATE from the STATION table. The STATION table is described as follows: My Answer SELECT CITY, STATE FROM STATION 2021. 3. 30. [MySQL] Japanese Cities' Names SQL > Basic Select > Japanese Cities' Names Problem Query the names of all the Japanese cities in the CITY table. The COUNTRYCODE for Japan is JPN. The CITY table is described as follows: My Answer SELECT NAME FROM CITY WHERE COUNTRYCODE = 'JPN' 2021. 3. 29. [MySQL] Japanese Cities Attributes SQL > Basic Select > Japanese Cities Attributes Problem Query all attributes of every Japanese city in the CITY table. The COUNTRYCODE for Japan is JPN. The CITY table is described as follows: My Answer SELECT * FROM CITY WHERE COUNTRYCODE = 'JPN' 2021. 3. 29. [MySQL] Select By ID SQL > Basic Select > Select By ID Problem Query all columns for a city in CITY with the ID 1661. The CITY table is described as follows: My Answer SELECT * FROM CITY WHERE ID = 1661 2021. 3. 27. [MySQL] Select All SQL > Basic Select > Select All Problem Query all columns (attributes) for every row in the CITY table. The CITY table is described as follows: My Answer SELECT * FROM CITY 2021. 3. 27. 이전 1 2 3 4 5 6 다음 반응형