일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Python3
- 릿코드
- 머신러닝
- 파이썬기초100제
- gcp
- 리트코드
- 자연어처리
- codeup
- 투포인터
- 파이썬기초
- 알고리즘
- GenerativeAI
- Python
- Microsoft
- LeetCode
- stratascratch
- nlp
- two-pointer
- sql코테
- 생성형AI
- medium
- 파이썬
- 데이터사이언스
- TwoPointer
- Blazor
- GenAI
- 구글퀵랩
- 파이썬알고리즘
- 코드업
- SQL
Archives
- Today
- Total
Tech for good
[Stratascratch/SQL] Find the total number of approved friendship requests in January and February 본문
IT/Data Science
[Stratascratch/SQL] Find the total number of approved friendship requests in January and February
Diana Kang 2025. 2. 26. 12:21# Solution 1
SELECT COUNT(*) AS n_approved
FROM facebook_friendship_requests
WHERE MONTH(date_approved) IN(1,2);
# Solution 2
SELECT COUNT(*) AS n_approved
FROM facebook_friendship_requests
WHERE date_approved IS NOT NULL
AND DATE_FORMAT(date_approved, '%Y-%m') IN ('2019-01', '2019-02');
'IT > Data Science' 카테고리의 다른 글
[Stratascratch/SQL] Find the country that has the most companies listed on Forbes (0) | 2025.02.27 |
---|---|
[Stratascratch/SQL] User Feature Completion (0) | 2025.02.26 |
[Stratascratch/SQL] Daily Interactions By Users Count (0) | 2025.02.26 |
[Stratascratch/SQL] Successfully Sent Messages (0) | 2025.02.26 |
[파이썬 정규표현식] re.sub() (0) | 2021.10.29 |