group by

· Language/SQL
SQL Project Planning | HackerRank Write a query to output the start and end dates of projects listed by the number of days it took to complete the project in ascending order. www.hackerrank.com Problem If the End_Date of the tasks are consecutive, then they are part of the same project. Samantha is interested in finding the total number of different projects completed. Write a query to output th..
· Language/SQL
Top Competitors | HackerRank Query a list of top-scoring hackers. www.hackerrank.com Problem Julia just finished conducting a coding contest, and she needs your help assembling the leaderboard! Write a query to print the respective hacker_id and name of hackers who achieved full scores for more than one challenge. Order your output in descending order by the total number of challenges in which t..
· Language/SQL
Challenges | HackerRank Print the total number of challenges created by hackers. www.hackerrank.com Problem Julia asked her students to create some coding challenges. Write a query to print the hacker_id, name, and the total number of challenges created by each student. Sort your results by the total number of challenges in descending order. If more than one student created the same number of ch..
· Language/SQL
코딩테스트 연습 - 고양이와 개는 몇 마리 있을까 ANIMAL_INS 테이블은 동물 보호소에 들어온 동물의 정보를 담은 테이블입니다. ANIMAL_INS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE는 각각 동물의 아이디 programmers.co.kr A373219 Cat 2014-07-29 11:43:00 Normal Ella Spayed Female A377750 Dog 2017-10-25 17:17:00 Normal Lucy Spayed Female A354540 Cat 2014-12-11 11:48:00 Normal Tux Neutered Male Cat 2 Dog 1 주어진 테이..
· Language/SQL
코딩테스트 연습 - 동명 동물 수 찾기 ANIMAL_INS 테이블은 동물 보호소에 들어온 동물의 정보를 담은 테이블입니다. ANIMAL_INS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE는 각각 동물의 아이디 programmers.co.kr A396810 Dog 2016-08-22 16:13:00 Injured Raven Spayed Female A377750 Dog 2017-10-25 17:17:00 Normal Lucy Spayed Female A355688 Dog 2014-01-26 13:48:00 Normal Shadow Neutered Male A399421 Dog 2015-08..
· Language/SQL
코딩테스트 연습 - 입양 시각 구하기(1) ANIMAL_OUTS 테이블은 동물 보호소에서 입양 보낸 동물의 정보를 담은 테이블입니다. ANIMAL_OUTS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, NAME, SEX_UPON_OUTCOME는 각각 동물의 아이디, 생물 programmers.co.kr 9 1 10 2 11 13 12 10 13 14 14 9 15 7 16 10 17 12 18 16 19 2 DATETIME에서 시간만 출력하고 해당 열의 이름을 HOUR로 지정한다. (HOUR(DATETIME) HOUR) DATETIME을 시간 단위로 그룹화 시킨다. HOUR이라는 그룹을 9 이상 19 이하로 제한한다. 시간 순으로 오름차순 정렬을 한다. SEL..
행복한쿼콰
'group by' 태그의 글 목록