해커랭크

1. 문제 Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table. The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. For example, if there are three records in the table with CITY values 'New York', 'New York', 'Bengalaru', there are 2 different city names: 'New Y..
1. 문제 Query the difference between the maximum and minimum populations in CITY. 2. 내풀이 SELECT MAX(POPULATION) - MIN(POPULATION) FROM CITY 3. 결과
1. 문제 Query the average population for all cities in CITY, rounded down to the nearest integer. -> rounded down : 버림 2. 내풀이 CEIL() : 올림 ex) SELECT CEIL(5.5) => 6 FLOOR() : 내림 ex) SELECT FLOOR(5.5) => 5 ROUND() : 반올림 ex) ROUND(5.556901, 4) => 5.5569 SELECT FLOOR(AVG(POPULATION)) FROM CITY -> 내림을 위해 FLOOR()함수로 감싸줌 3. 결과
1. 문제 Query a count of the number of cities in CITY having a Population larger than 100,000. (larger than=초과) 2. 내풀이 SELECT COUNT(ID) FROM CITY WHERE POPULATION > 100000 3. 결과
1. 문제 Query the total population of all cities in CITY where District is California. 2. 내풀이 SELECT SUM(POPULATION) FROM CITY WHERE DISTRICT="California" 3. 결과
https://www.youtube.com/watch?v=27IOUaUTN04&feature=youtu.be SQL 데이터 분석 캠프(실전반)를 수강하게 되어 기초 SQL 문법을 다시 숙지하기 위해 SQL 복기 공부를 하려고 합니다. SQL 기본 문법 : SELECT, FROM, WHERE, ORDER BY, LIMIT 조건문 : CASE, IF 그룹집계 : GROUP BY, HAVING 테이블 연결 : JOIN 영상 요약 겸 공부한 내용들을 정리해보도록 하겠습니다! - 데이터 분석가의 관점에서 쌓여있는 데이터들을 어떻게하면 잘 가지고 올 수 있을지에 대한 고민 - SQL 문제 풀이(해커랭크) : 카카오 코딩테스트 플랫폼으로 많이 알려져있음 Dashboard | HackerRank Join over 16..
xod22
'해커랭크' 태그의 글 목록