강의

멘토링

커뮤니티

Inflearn Community Q&A

hyerim6164's profile image
hyerim6164

asked

[A hundred words are not as good as seeing once] Basic SQL for data analysis

WHERE HackerRank Problem Solving 1 + DISTINCT that removes duplicate values

Weather Observation Station 6 쿼리가 틀렸다고 나오는 이유를 모르겠어요

Resolved

Written on

·

44

0

SELECT city
FROM station
WHERE city LIKE 'a%' 
OR LIKE 'e%' 
OR LIKE 'i%' 
OR LIKE 'o%' 
OR LIKE 'u%'
sqlmysql

Answer 1

0

jaemin님의 프로필 이미지
jaemin
Instructor

WHERE city LIKE 'a%' 
   OR city LIKE 'e%' 
   OR city LIKE 'i%' 
   OR city LIKE 'o%' 
   OR city LIKE 'u%'

위와 같이 OR로 연결된 모든 조건에 'city' 컬럼명을 적어서 'city 값이 e로 시작하는 데이터'라는 의미를 확실히 하는 구문으로 작성해야 합니다.

hyerim6164's profile image
hyerim6164

asked

Ask a question