Back to problems

Average Vacant Days

SQL · Airbnb · Easy

Problem You are given a table rental_availability that tracks the windows during which properties are available for rent. Table: rental_availability The combination (listing_id, available_from) serves as the primary key. Every row represents a single continuous block of availability for a specific listing. Write a SQL query that calculates the average number of vacant days across all listings. For each individual listing, you must first sum the total days it is available…

Checking your access…