분류 전체보기

SQL 문제풀이

[해커랭크 SQL] Basic Select - Weather Observation Station 6

❓ Question https://www.hackerrank.com/challenges/weather-observation-station-6 Weather Observation Station 6 | HackerRank Query a list of CITY names beginning with vowels (a, e, i, o, u). www.hackerrank.com ❗ Answer SELECT DISTINCT(city) FROM station WHERE LEFT(city,1) IN ('a','e','i','o','u'); 📌 Discussion - LEFT(column,num)으로 왼쪽부터 num번째까지의 데이터를 추출 - a IN b 으로 b안에 a가 있는 레코드만 추출

SQL 문제풀이

[해커랭크 SQL] Basic Select - Weather Observation Station 4

❓ Question https://www.hackerrank.com/challenges/weather-observation-station-4 Weather Observation Station 4 | HackerRank Find the number of duplicate CITY names in STATION. www.hackerrank.com ❗ Answer SELECT COUNT(city)-COUNT(DISTINCT city) FROM station; 📌 Discussion - COUNT로 레코드의 개수를 집계

SQL 문제풀이

[해커랭크 SQL] Basic Select - Weather Observation Station 3

❓ Question https://www.hackerrank.com/challenges/weather-observation-station-3 Weather Observation Station 3 | HackerRank Query a list of unique CITY names with even ID numbers. www.hackerrank.com ❗ Answer SELECT DISTINCT(city) FROM station WHERE id%2 = 0; 📌 Discussion - DISTINCT로 중복된 레코드 제거

SQL 문제풀이

[해커랭크 SQL] Basic Select - Weather Observation Station 1

❓ Question https://www.hackerrank.com/challenges/weather-observation-station-1 Weather Observation Station 1 | HackerRank Write a query to print the CITY and STATE for each attribute in the STATION table. www.hackerrank.com ❗ Answer SELECT city, state FROM station; 📌 Discussion - SELECT 원하는 컬럼만 추출

SQL 문제풀이

[해커랭크 SQL] Basic Select - Japanese Cities' Names

❓ Question https://www.hackerrank.com/challenges/japanese-cities-name Japanese Cities' Names | HackerRank In this challenge, you will query a list of all the Japanese cities' names. www.hackerrank.com ❗ Answer SELECT name FROM city WHERE countrycode = 'JPN'; 📌 Discussion - SELECT 문에서 name 컬럼만 추출

SQL 문제풀이

[해커랭크 SQL] Basic Select - Japanese Cities' Attributes

❓ Question https://www.hackerrank.com/challenges/japanese-cities-attributes Japanese Cities' Attributes | HackerRank Query the attributes of all the cities in Japan. www.hackerrank.com ❗ Answer SELECT * FROM city WHERE countrycode = 'JPN'; 📌 Discussion - WHERE 절에서 조건문으로 필터링

SQL 문제풀이

[해커랭크 SQL] Basic Select - Select By ID

❓ Question https://www.hackerrank.com/challenges/select-by-id ❗ Answer SELECT * FROM city WHERE id = 1661; 📌 Discussion - number type 데이터는 숫자형식으로 조건문에 걸어줘야한다.

SQL 문제풀이

[해커랭크 SQL] Basic Select - Select All

❓ Question https://www.hackerrank.com/challenges/select-all-sql Select All | HackerRank Query all columns for every row in a table. www.hackerrank.com ❗ Answer SELECT * FROM city; 📌 Discussion - SELECT 절에서 *로 모든 레코드를 추출

냄비짱
'분류 전체보기' 카테고리의 글 목록 (21 Page)