Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- AWS
- string_agg()
- mybatis
- list중복제거
- 권한정책
- awsconsole
- 두개리스트비교
- instance생성
- ansible
- anymatch메서드
- wordpress블로그
- route53
- 중복제거
- 리스트비교
- Annotation
- 3tierarchitecture
- 지옥같은git
- enum
- 리스트합집합
- WordPress
- 널포인터에러
- PostgreSQL
- Spring
- Java
- enumtype
- 리스트교집합
- hashset
- db
- 리스트차집합
- lightsail
Archives
- Today
- Total
Anyway
[DB] postgresql Count 함수 사용하기
SELECT COUNT(CASE WHEN score BETWEEN 9 AND 10 THEN 1 END) AS excellent_score, COUNT(CASE WHEN score BETWEEN 7 AND 8 THEN 1 END) AS good_score, COUNT(CASE WHEN score BETWEEN 1 AND 6 THEN 1 END) AS bad_score, COUNT((CASE WHEN score BETWEEN 1 AND 6 THEN 1 END) AND (CASE WHEN A = false AND B = false AND C = false THEN 1 END)) AS bad_score_unconfirmed, COUNT(CASE WHEN score IS NULL OR ..
Database
2024. 12. 19. 14:44