Skip to content

[Sql] 중복 제거하기 #222

Description

@hwangJi-dev

💬 문제

https://school.programmers.co.kr/learn/courses/30/lessons/59408


💬 Idea

  • 이름을 중복제거한 뒤 카운트를 구한다.
  • 이 때 NULL값을 제거하기 위해 조건문을 사용해준다.

💬 풀이

SELECTCOUNT(DISTINCT NAME) AS count
FROM ANIMAL_INS
WHERE NAME IS NOT NULL

💬 알게된 문법

DISTINCT

  • 중복 제거할 때 사용

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions