inflearn logo
강의

Course

Instructor

[Practice Makes Perfect] Intermediate SQL for Data Analysis

HackerRank Aggregate Functions Problem Solutions

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

421

yujeongee

2 asked

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

1

jungsh4297

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

질문있습니다!

0

62

1

리트코드 1280. Students and Examinations

0

168

3

16강 LEFT JOIN 리트코드 (183. Customers Who Never Order) 관련 질문

0

165

2

African Cities 문제관련 질문

0

106

1

SQL 코딩테스트 질문

0

333

1

HACKER RANK에서 문제찾기

0

179

2

강의 자료 다운로드

0

152

2

Asian population 문제가 없어요

0

137

2

INNER JOIN 에서 A.키 쓸때 빨간 색 나오고 'dause'

0

134

2

별칭 관련해서 질문 있습니다.

0

142

2

rising temperature 문제 질문

0

171

2

해커랭크 TOP EARNERS 문제 질문

0

157

1

ON 뒤에 질문

0

169

2

INNER JOIN 질문. 강의와 결과값이 다릅니다.

0

276

3

END, 뒤에 * 붙이면 에러가 뜹니다

1

292

2

CustomerID가 중복되서 나타나요

0

313

3

별칭이 전체 테이블을 못 불러와요.

0

216

2

CASE WHEN 쿼리 오류 문의

1

428

3

CASE문제풀이 질문

0

195

1

Customers Who Never Order 풀다가 Alias관련 질문사항

0

187

1

Average Population 질문

0

205

1

Revising Aggregations - The Count Function 질문

0

155

1

Average Population of Each Continent 에대해서 질문

0

254

3

w3schools 에서 쿼리 작성 질문

0

233

1