Data/SQL26 [HackerRank] The Report You are given two tables: Students and Grades. Students contains three columns ID, Name and Marks. Ketty gives Eve a task to generate a report containing three columns: Name, Grade and Mark. Ketty doesn't want the NAMES of those students who received a grade lower than 8. The report must be in descending order by grade -- i.e. higher grades are entered first. If there is more than one student wi.. 2023. 2. 15. [HackerRank] SQL Basic 문제 풀이 (MySQL) 1. Weather Observation Station 6 Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. Your result cannot contain duplicates. 2. Weather Observation Station 7 Query the list of CITY names ending with vowels (a, e, i, o, u) from STATION. Your result cannot contain duplicates. 3. Weather Observation Station 8 Query the list of CITY names from STATION which have v.. 2023. 2. 8. [HackerRank] Occupations, The PADS. 문제 풀이 (MySQL) Occupations The first column is an alphabetically ordered list of Doctor names. The second column is an alphabetically ordered list of Professor names. The third column is an alphabetically ordered list of Singer names. The fourth column is an alphabetically ordered list of Actor names. The empty cell data for columns with less than the maximum number of names per occupation (in this case, the P.. 2023. 2. 6. [SQLZOO] JOIN 문제 풀이 01. The table eteam gives details of every national team including the coach. You can JOIN goal to eteam using the phrase goal JOIN eteam on teamid=id Show player, teamid, coach, gtime for all goals scored in the first 10 minutes gtime 2023. 2. 1. [프로그래머스] SQL Kit 문제 풀이(2) 01. 5월 식품들의 총매출 조회하기 - FOOD_PRODUCT와 FOOD_ORDER 두 개의 테이블 존재 - 생산일자가 2022년 5월인 식품들의 식품 ID, 식품 이름, 총매출을 조회하는 SQL문 작성 - 결과는 총매출을 기준으로 내림차순 정렬, 총매출이 같다면 식품 ID를 기준으로 오름차순 정렬 * 두 테이블을 JOIN으로 연결한 후, WHERE절에 생산일자 조건 주기 * 총매출 = PRICE*AMOUNT 풀이 코드 위에 작성한 WHERE절 코드 외에도 2022년 5월만 추출하는 방법은 여러가지가 있다. (1) WHERE PRODUCE_DATE BETWEEN '2022-05-01' AND '2022-05-31' (2) WHERE PRODUCE_DATE LIKE '2022-05%' (2)번 방법이 가.. 2023. 1. 29. [프로그래머스] SQL Kit 문제 풀이(1) 작년 인턴을 한 후로 SQL을 완전히 까먹었다. 데이터 분야에서 SQL 능력은 기본 중의 기본이기 때문에.. 복습 및 실력 향상을 위해 오늘부터 SQL 코딩 테스트 문제 풀이를 시작했다. 기본적인 것부터 시작해서 난이도 있는 문제 풀이까지 해야겠다. 파이팅.. 01. 조건에 맞는 도서와 저자 리스트 출력하기 - BOOK, AUTHOR 두 개의 테이블 존재 - 경제 카테고리에 속하는 도서들의 도서 ID, 저자명, 출판일 리스트를 출력하는 SQL문 작성 - 출판일 기준으로 오름차순 정렬 - 출판일의 데이트 포맷이 예시와 동일해야 정답처리(ex. 2023-01-28) 풀이 코드 JOIN문을 활용하면 풀 수 있는 쉬운 문제이다. JOIN은 기본적으로 두 테이블 간의 공통 컬럼을 KEY로 연결하여 사용한다. 이 .. 2023. 1. 28. 이전 1 2 3 4 5 다음