inflearn logo
강의

Course

Instructor

[Practice Makes Perfect] Intermediate SQL for Data Analysis

HackerRank Aggregate Functions Problem Solutions

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

388

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) 라고 써주셔야 합니다.

리트코드 1280. Students and Examinations

0

74

3

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

0

89

2

African Cities 문제관련 질문

0

53

1

SQL 코딩테스트 질문

0

206

1

HACKER RANK에서 문제찾기

0

96

2

강의 자료 다운로드

0

90

2

Asian population 문제가 없어요

0

77

2

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

0

66

2

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

0

79

2

rising temperature 문제 질문

0

98

2

해커랭크 TOP EARNERS 문제 질문

0

99

1

ON 뒤에 질문

0

94

2

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

0

196

3

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

1

203

2

CustomerID가 중복되서 나타나요

0

233

3

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

0

142

2

CASE WHEN 쿼리 오류 문의

1

325

3

CASE문제풀이 질문

0

124

1

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

0

136

1

Average Population 질문

0

129

1

Revising Aggregations - The Count Function 질문

0

104

1

Average Population of Each Continent 에대해서 질문

0

193

3

w3schools 에서 쿼리 작성 질문

0

159

1

INNER JOIN 할 때 NULL 값이 안보일 수도 있나요?

0

329

1