일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- Word2vec
- 딥러닝
- stak
- skip-gram
- que
- algorithm
- backward
- Heap
- Python
- SQL
- 자연어처리
- Programmers
- 신경망
- Sigmoid
- sort
- 프로그래머스
- select
- DeepLearning
- boj
- Numpy
- dl
- FullyConnectedLayer
- CBOW
- hash
- Stack
- MySQL
- affine
- PPMI
- 파이썬
- kakao
- Today
- Total
혜온의 이것저것
[Programmers] 코딩테스트 연습 SQL - level3 본문
SELECT *
from places
where host_id in (
select host_id from places
group by host_id
having count(id)>=2)
order by id
없어진 기록 찾기
https://programmers.co.kr/learn/courses/30/lessons/59042
코딩테스트 연습 - 없어진 기록 찾기
ANIMAL_INS 테이블은 동물 보호소에 들어온 동물의 정보를 담은 테이블입니다. ANIMAL_INS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE는 각각 동물의 아이디
programmers.co.kr
select animal_id, name
from animal_outs
where animal_id not in (select animal_id from animal_ins)
order by animal_id
있었는데요 없었습니다
https://programmers.co.kr/learn/courses/30/lessons/59043
코딩테스트 연습 - 있었는데요 없었습니다
ANIMAL_INS 테이블은 동물 보호소에 들어온 동물의 정보를 담은 테이블입니다. ANIMAL_INS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE는 각각 동물의 아이디
programmers.co.kr
select ins.animal_id, ins.name
from animal_ins ins, animal_outs outs
where ins.animal_id = outs.animal_id and ins.datetime > outs.datetime
order by ins.datetime
오랜 기간 보호한 동물(1)
https://programmers.co.kr/learn/courses/30/lessons/59044
코딩테스트 연습 - 오랜 기간 보호한 동물(1)
ANIMAL_INS 테이블은 동물 보호소에 들어온 동물의 정보를 담은 테이블입니다. ANIMAL_INS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE는 각각 동물의 아이디
programmers.co.kr
select name, datetime
from animal_ins
where animal_id not in (select animal_id from animal_outs)
order by datetime
limit 3
헤비 유저가 소유한 장소
https://programmers.co.kr/learn/courses/30/lessons/77487
코딩테스트 연습 - 헤비 유저가 소유한 장소
PLACES 테이블은 공간 임대 서비스에 등록된 공간의 정보를 담은 테이블입니다. PLACES 테이블의 구조는 다음과 같으며 ID, NAME, HOST_ID는 각각 공간의 아이디, 이름, 공간을 소유한 유저의 아이디를
programmers.co.kr
SELECT *
from places
where host_id in (
select host_id from places
group by host_id
having count(id)>=2)
order by id
오랜 기간 보호한 동물(2)
https://programmers.co.kr/learn/courses/30/lessons/59411
코딩테스트 연습 - 오랜 기간 보호한 동물(2)
ANIMAL_INS 테이블은 동물 보호소에 들어온 동물의 정보를 담은 테이블입니다. ANIMAL_INS 테이블 구조는 다음과 같으며, ANIMAL_ID, ANIMAL_TYPE, DATETIME, INTAKE_CONDITION, NAME, SEX_UPON_INTAKE는 각각 동물의 아이디
programmers.co.kr
select outs.animal_id, outs.name
from animal_outs outs, animal_ins ins
where outs.animal_id = ins.animal_id
order by datediff(ins.datetime,outs.datetime)
limit 2
'Data Analysis > SQL' 카테고리의 다른 글
[HackerRank] Revising the Select Query II (MySQL) (0) | 2022.08.03 |
---|---|
[HackerRank] Revising the Select Query I (MySQL) (0) | 2022.08.03 |
[Programmers] 코딩테스트 연습 SQL - level4 (0) | 2022.06.29 |
[Programmers] 코딩테스트 연습 SQL - level2 (0) | 2022.03.22 |
[Programmers] 코딩테스트 연습 SQL - level1 (0) | 2022.03.17 |