강의

멘토링

커뮤니티

Inflearn コミュニティ Q&A

yujeongee のプロフィール画像
yujeongee

投稿した質問数

[百聞は一見に如かず] データ分析のための中級SQL

集計関数 HackerRank 問題解説

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

作成

·

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

回答 1

0

yujeongee님의 프로필 이미지
yujeongee
質問者

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

yujeongee のプロフィール画像
yujeongee

投稿した質問数

質問する