알고리즘/프로그래머스

헤비 유저가 소유한 장소

베리영young 2024. 9. 18. 04:53

우힛

 

with A as (
  select HOST_ID
    from PLACES
    group by HOST_ID
having count(*) >= 2
)

-- 코드를 입력하세요
SELECT ID, NAME, A.HOST_ID
from PLACES inner join A
on PLACES.HOST_ID = A.HOST_ID

order by ID