• 카테고리

    질문 & 답변
  • 세부 분야

    데이터 분석

  • 해결 여부

    미해결

해커랭크 마지막문제 4번 다릅니다.

21.12.15 18:08 작성 조회수 210

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

답변을 작성해보세요.

0

유정님의 프로필

유정

질문자

2021.12.15

정성훈님의 프로필

정성훈

2021.12.16

COUNT  (DISTINCT city) 라고 쓴 부분에서 COUNT 와 괄호 사이에 띄어쓰기를 넣으면 안됩니다.
COUNT(DISTINCT city) 라고 써주셔야 합니다.