Network disconnected
Description
PLACES
is a table containing information of spaces for rent that are registered on a space rental platform. The structure of PLACES
is as follows, where each of ID
, NAME
, and HOST_ID
represents space ID, name of space, and landlord ID. ID
is the primary key.
NAME | TYPE |
---|---|
ID | INT |
NAME | VARCHAR |
HOST_ID | INT |
Problem
In this platform, landlords who have registered two or more spaces are called "heavy users". Please write an SQL statement that returns the information of spaces registered by heavy users. Sort them by ID.
Example
Suppose PLACES
is as follows:
ID | NAME | HOST_ID |
---|---|---|
4431977 | BOUTIQUE STAYS - Somerset Terrace, Pet Friendly | 760849 |
5194998 | BOUTIQUE STAYS - Elwood Beaches 3, Pet Friendly | 760849 |
16045624 | Urban Jungle in the Heart of Melbourne | 30900122 |
17810814 | Stylish Bayside Retreat with a Luscious Garden | 760849 |
22740286 | FREE PARKING - The Velvet Lux in Melbourne CBD | 30900122 |
22868779 | ★ Fresh Fitzroy Pad with City Views! ★ | 21058208 |
- Landlord 760849 registered three spaces, which makes her a heavy user.
- Landlord 30900122 registered two spaces, which makes her a heavy user.
- Landlord 21058208 registered one space, which makes her not a heavy user.
Therefore, your SQL statement must return the following:
ID | NAME | HOST_ID |
---|---|---|
4431977 | BOUTIQUE STAYS - Somerset Terrace, Pet Friendly | 760849 |
5194998 | BOUTIQUE STAYS - Elwood Beaches 3, Pet Friendly | 760849 |
16045624 | Urban Jungle in the Heart of Melbourne | 30900122 |
17810814 | Stylish Bayside Retreat with a Luscious Garden | 760849 |
22740286 | FREE PARKING - The Velvet Lux in Melbourne CBD | 30900122 |
Result
Result of [Run Test] or [Submit] will be displayed here