TECH

Weather Observation Station 10

AKA.DM 2022. 6. 10. 12:42
반응형

Query the list of CITY names from STATION that do not end with vowels. Your result cannot contain duplicates.

Input Format

The STATION table is described as follows:

 

 

select distinct city
from station
minus
select distinct city
from station
where
    regexp_like(city, '[aeiou]$', 'i');

이번 문제도 동일하게 minu 구문 및 regexp_like 정규식 표현을 이용해서 도출 함

 

select distinct city
from station
where
    city not like '%a'
    and
    city not like '%e'
    and
    city not like '%i'
    and
    city not like '%o'
    and
    city not like '%u';

not like 를 이용하여도 결과가 도출됨

 

다만, and 조건을 써야하는게 궁금할뿐이다. 

 

or 조건이 이거나 이거나 이거나 이고

and 조건은 이면서 이면서 이면서 로 알고 있는데

not like 에서는 왜 and로 가야하는것인가.

 

반응형

'TECH' 카테고리의 다른 글

Weather Observation Station 12  (0) 2022.06.13
Weather Observation Station 11  (0) 2022.06.10
Weather Observation Station 9  (0) 2022.06.10
Weather Observation Station 8  (0) 2022.06.10
Weather Observation Station 5  (0) 2022.06.09