작성한 질문수
[백문이불여일타] 데이터 분석을 위한 중급 SQL
집계함수 해커랭크 문제풀이
작성
·
340
0
Find the difference between the total number of CITY entries in the table and the number of distinct CITY entries in the table.The STATION table is described as follows:
이거구요
답을
SELECT COUNT(city) - COUNT (distinct city)
FROM station
했는데 애러만 나와요ㅠㅠ
답변 1
COUNT (DISTINCT city) 라고 쓴 부분에서 COUNT 와 괄호 사이에 띄어쓰기를 넣으면 안됩니다.COUNT(DISTINCT city) 라고 써주셔야 합니다.
COUNT (DISTINCT city) 라고 쓴 부분에서 COUNT 와 괄호 사이에 띄어쓰기를 넣으면 안됩니다.
COUNT(DISTINCT city) 라고 써주셔야 합니다.