📅 2021.06.20
💬
2주차 개발일지
- 개수 select 필드명, count(*) from 테이블명 group by 필드명 - 최솟값 select 필드명, count(*) from 테이블명 group by 필드명 - 최댓값 select 필드명, max from 테이블명 group by 필드명 - 평균 select 필드명, avg(필드명) from 테이블명 group by 필드명 - 합계 select 필드명, sum(필드명) from 테이블명 group by 필드명 - 오름차순 정렬 order by 필드명 - 내림차순 정렬 order by 필드명 desc 별칭 기능 select * from 테이블명 o where o.필드명 select 필드명, count(*) as cnt from 테이블명 o where o.필드명