반응형 mysql sum3 [MYSQL] Weather Observation Station 2 ▶ SQL > Aggregation > Weather Observation Station 2 Problem Query the following two values from the STATION table: The sum of all values in LAT_N rounded to a scale of 2 decimal places. → LAT_N의 모든 값의 합을 소수점 2자리까지 반올림한 값 The sum of all values in LONG_W rounded to a scale of 2 decimal places. → LONG_W의 모든 값의 합을 소수점 2잘까지 반올림한 값 Input Format The STATION table is described as follows: where LAT_N is.. 2021. 8. 9. [MYSQL] Japan Population ▶ SQL > Aggregation > Japan Population Problem Query the sum of the populations for all Japanese cities in CITY. The COUNTRYCODE for Japan is JPN. Input Format The CITY table is described as follows: My Answer SELECT SUM(POPULATION) FROM CITY WHERE COUNTRYCODE = 'JPN' NOTE SUM(필드명) : 필드 값을 더할 때 사용하는 함수 COUNT(필드명) : NULL이 아닌 레코드의 수 COUNT(*)은 레코드의 개수를 나타내지만 SUM(*)은 오류 2021. 5. 13. [MySQL] Revising Aggregations - The Sum Function SQL > Basic Select > Revising Aggregations - The Sum Function Problem Query the total population of all cities in CITY where District is California. Input Format The CITY table is described as follows: My Answer SELECT SUM(POPULATION) FROM CITY WHERE DISTRICT = 'California' 2021. 4. 20. 이전 1 다음 반응형