Today I Learned.../MySQL(40)
-
[HackerRank MySQL] Count/Sum/Average, Ceil/Floor, Replace 문제풀기 (Basic)
Revising Aggregations - The Count Function Query a count of the number of cities in CITY having a Population larger than 100,000. Input Format The CITY table is described as follows: select count(*) from city where population > 100000 Revising Aggregations - The Sum Function Query the total population of all cities in CITY where District is California. select sum(population) from city where dist..
2021.01.05 -
[HackerRank MySQL] ORDER BY 문제풀기 (Basic)
Higher Than 75 Marks Query the Name of any student in STUDENTS who scored higher than 75 Marks. Order your output by the last three characters of each name. If two or more students both have names ending in the same last three characters (i.e.: Bobby, Robby, etc.), secondary sort them by ascending ID. The STUDENTS table is described as follows: The Namecolumn only contains uppercase (A-Z) and lo..
2021.01.05 -
[HackerRank MySQL] Weather Observation Station 1, 3-12 + REGEXP (Basic) & MOD() Function
Weather Observation Station 1 Query a list of CITY and STATE from the STATION table. The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. select city, state from station Weather Observation Station 3 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..
2021.01.05 -
[HackerRank MySQL] SELECT, WHERE 문제풀기 (Basic)
Revising the Select Query I Query all columns for all American cities in the CITY table with populations larger than 100000. The CountryCode for America is USA. The CITY table is described as follows: select * from city where population > 100000 and countrycode = 'usa' Revising the Select Query II Query the NAME field for all American cities in the CITY table with populations larger than 120000...
2021.01.05 -
[프로그래머스 SQL 고득점 Kit] String, Date 문제풀기
루시와 엘라 찾기 ANIMAL_INS 테이블은 동물 보호소에 들어온 동물의 정보를 담은 테이블입니다. ANIMAL_INS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE는 각각 동물의 아이디, 생물 종, 보호 시작일, 보호 시작 시 상태, 이름, 성별 및 중성화 여부를 나타냅니다. NAME TYPE NULLABLE ANIMAL_ID VARCHAR(N) FALSE ANIMAL_TYPE VARCHAR(N) FALSE DATETIME DATETIME FALSE INTAKE_CONDITION VARCHAR(N) FALSE NAME VARCHAR(N) TRUE SEX_UPON_INTAKE VARCHA..
2020.12.29 -
[프로그래머스 SQL 고득점 Kit] JOIN 문제풀기
없어진 기록 찾기 ANIMAL_INS 테이블은 동물 보호소에 들어온 동물의 정보를 담은 테이블입니다. ANIMAL_INS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE는 각각 동물의 아이디, 생물 종, 보호 시작일, 보호 시작 시 상태, 이름, 성별 및 중성화 여부를 나타냅니다. NAME TYPE NULLABLE ANIMAL_ID VARCHAR(N) FALSE ANIMAL_TYPE VARCHAR(N) FALSE DATETIME DATETIME FALSE INTAKE_CONDITION VARCHAR(N) FALSE NAME VARCHAR(N) TRUE SEX_UPON_INTAKE VARCHA..
2020.12.29