RienSQL
TASK #71 · Hard

Percentage of active users

Your brief
Find what percentage of users registered on the booking service have rented or rented out a property at least once. A user counts as having rented out a property if they own a room with at least one reservation. Round the result to the nearest hundredth.
Expected columnspercentAirbnb
SQL editor
SQLite
Ctrl / ⌘ + ↵
Result

Write a query and run it to see the results.

Schema
usersid, name, email, email_verified_at, password, phone_number
reservationsid, user_id, room_id, start_date, end_date, price, total
roomsid, home_type, address, has_tv, has_internet, has_kitchen, has_air_con, price, owner_id, latitude, longitude
reviewsid, reservation_id, rating