Hackerrank average population

홍진우·2024년 2월 18일

SQL

목록 보기
2/4

city 테이블의 칼럼과 데이터타입은 위와 같다.

Q: Query the average population for all cities in CITY, rounded down to the nearest integer.

SELECT FLOOR(AVG(POPULATION))
FROM CITY

소수점을 모두 버리는 floor함수를 적용해서 문제를 풀었다.

profile
데이터분석/ AI논문리뷰/알고리즘 공부

0개의 댓글