728x90
반응형
문제 : Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. Your result cannot contain duplicates.
SUBSTR을 사용할 때 start의 위치를 -1로 지정해주었다.
( python의 list[-1] 느낌 ! )
SELECT distinct CITY
FROM STATION
WHERE SUBSTR(CITY, -1, 1) IN ('a', 'e', 'i', 'o', 'u');
Glencoe Chelsea Pelahatchie Dorrance Cahone Upperco Waipahu Millville Aguanga Morenci South El Monte Gustine Delano Westphalia Saint Elmo Raymondville Barrigada Hesperia Wickliffe Milledgeville East China Gretna Zionsville Rio Oso Samantha Bentonville Grosse Pointe Robertsdale Dale Tennessee Chokio Bertha Regina Mascotte Netawaka East Irvine Amo Delta Jerome Baton Rouge Clarkdale Pheba Eleele Oconee Grandville Susanville Rosie Verona De Tour Village West Grove Bono Biggsville Amazonia Marysville Cape Girardeau Crane Lake Grayslake Bellevue Lynnville Hope Aliso Viejo Gowrie Andersonville Crouseville Arkadelphia Eriline Howard Lake Hagatna Eastlake Corriganville Tarzana Grapevine Kanorado Curdsville Notasulga Pleasant Grove Skanee Springerville Yellow Pine Ravenna Brownsdale Hayesville Greenville Yellville Weldona Cascade Bayville Arispe Baileyville Lakeville Pico Rivera Pawnee Bainbridge Dupo Montrose Ermine Casco Madisonville Lismore Eufaula Wildie Mosca Lottie Daleville Cuba Renville Kirksville Lydia Monona Lakota Grand Terrace Fort Meade Hayneville Losantville Caseville Pomona Hopkinsville Dixie Hillside Osborne Elm Grove Atlantic Mine Honolulu Oshtemo Monroe Archie Alpine Ojai Urbana Palatka Yuma Alba Waresboro Magnolia Dundee Chilhowee Eskridge Ozona Woodsboro Clio Yalaha Leakesville Shasta Calpine Tina Middleboro Lena Lee Mid Florida Acme
728x90
반응형
'DB > SQL' 카테고리의 다른 글
HackerRank_15. Weather Observation Station 9 (0) | 2020.06.11 |
---|---|
HackerRank_14. Weather Observation Station 8 (0) | 2020.06.11 |
HackerRank_12. Weather Observation Station 6 (0) | 2020.06.11 |
HackerRank_11. Weather Observation Station 5 (0) | 2020.06.11 |
HackerRank_10. Weather Observation Station 4 (0) | 2020.06.11 |