성이 남씨인 유저의 이메일만 추출하기
select * from users
where name = "남**"
// 오답풀이 *를 email로 바꿔준다
Gmail을 사용하는 2020/07/12~13에 가입한 유저를 추출하기
select * from users
where email like "%gmail.com"
and created_at between "2020-07-13" and "2020-07-15"
Gmail을 사용하는 2020/07/12~13에 가입한 유저의 수를 세기
select count(*) from users
where email like "%gmail.com"
and created_at between "2020-07-13" and "2020-07-15"
'SQL' 카테고리의 다른 글
[SQL] Homework 2 (0) | 2022.02.24 |
---|---|
[SQL] Quiz 2 (0) | 2022.02.24 |
[SQL] 2주차 Group by, Order by (0) | 2022.02.24 |
[SQL] homework (0) | 2022.02.23 |
[SQL] 1주차 : Selcet 쿼리문 / Where절 (0) | 2022.02.23 |