강의

멘토링

커뮤니티

Inflearn Community Q&A

yujeongee's profile image
yujeongee

asked

[Practice Makes Perfect] Intermediate SQL for Data Analysis

HackerRank Aggregate Functions Problem Solutions

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

Written on

·

380

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 

 

했는데 애러만 나와요ㅠㅠ 

sql

Answer 1

0

yujeongee님의 프로필 이미지
yujeongee
Questioner

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

yujeongee's profile image
yujeongee

asked

Ask a question