Data Interview Qs - Airbnb stays by country

InterviewQs

Airbnb stays by country

SQL Database Querying

Forward this email to a friend or colleague and challenge them to solve it.

Hi, 

Suppose you work for Airbnb as an analyst. A team has come to you asking for a ranked list containing total # stays as well as total revenue, split by country. The time frame they're looking for is all stays that began in 2018. You can sort the list in descending order by revenue.

The table schemas are provided below. Using SQL, write a query to answer this question.

Table: property_location_info

Column Name Data Type Description
property_id integer ID of the property location
country string country code of the property location
city_name string name of city (note there can be multiple cities with the same name)
subregion_name string provence, state, or subregion name
address string address of property location

Table: stays_info

Column Name Data Type Description
guest_id integer ID of guest
property_id integer ID of the property location
host_id integer ID of the host managing the property
revenue integer cost of stay for guest in USD
date_start string start day of stay, format is "YYYY-mm-dd"
date_end string end day of stay, format is "YYYY-mm-dd"
stay_length integer number of days for the stay
airbnb_revenue integer revenue that Airbnb collected on stay



 

You’ve accumulated 185 questions since joining our email list. Create a premium account to access detailed solutions to each problem (including this one) + our new Case studies.


Was this email forwarded to you? You can join our list here to receive questions

How did you like today's question?

15411 Boischatel, Montreal, QC, H9H1Y7, Canada
Don't want to get these emails anymore? We'll forgive you if you unsubscribe

Older messages

Fraudulent transactions

Monday, September 6, 2021

Data Analysis, Python, Pandas, Data Manipulation, Data Visualization, Histogram, External Dataset, InterviewQs Fraudulent transactions Data Analysis Python Pandas Data Manipulation Data Visualization

Bias-Variance Tradeoff

Friday, September 3, 2021

InterviewQs Bias-Variance Tradeoff Forward this email to a friend or colleague and challenge them to solve it. Hi, Can you explain what the Bias-Variance Tradeoff is? Can you share an example of when

Subarray sums

Wednesday, September 1, 2021

InterviewQs Subarray sums Forward this email to a friend or colleague and challenge them to solve it. Hi, Suppose you're given an array of integers, and a number x. Find the smallest subarray with

Picking a survey group

Monday, August 30, 2021

InterviewQs Picking a survey group Forward this email to a friend or colleague and challenge them to solve it. Hi, You work for a large hardware company (one that manufactures watches, computers, and

Replacing bad data with Pandas

Friday, August 27, 2021

InterviewQs Replacing bad data with Pandas Forward this email to a friend or colleague and challenge them to solve it. Hi, Suppose you are given a dataframe, df, that contains various negative values.

You Might Also Like

Address the challenges of modern access

Wednesday, May 8, 2024

Join us on May 16th to learn why you need to extend access management ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

⚙️ OpenAI inks another major media deal

Wednesday, May 8, 2024

Plus: New polling from the AIPI & Apple's chipmaking efforts ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

Build5Nines - Local Generative AI, GitHub Copilot Chat, Azure Copilot

Wednesday, May 8, 2024

View this email in your browser Build5Nines - Cloud, DevOps & SRE Guidance Build5Nines Newsletter Your trusted source for Cloud, DevOps, and SRE guidance with Chris Pietschmann! Thank you for

FTX fraud victims are going to get their money back

Wednesday, May 8, 2024

Most of the company's customers will get their money back - plus interest View this email online in your browser By Alex Wilhelm Wednesday, May 8, 2024 Welcome to TechCrunch AM! Today we have notes

Who the 2024 iPad Pro is really for

Wednesday, May 8, 2024

Google Pixel 8a hands-on; Copilot prompt features; Best microSD cards -- ZDNET ZDNET Tech Today - US May 8, 2024 placeholder I've used every iPad since the original. Here's my buying advice for

DeveloPassion's Newsletter - Midweek Links #20

Wednesday, May 8, 2024

Edition Links #20 of my newsletter, discussing Knowledge Management, Knowledge Work, Zen Productivity, Personal Organization, and more! Sébastien Dubois DeveloPassion's Newsletter

Why you can't live (much longer) without digital BOMs

Wednesday, May 8, 2024

‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

How To Manage GenAI Security Risks

Wednesday, May 8, 2024

Managing GenAI Risks with SSPM Here to stay, GenAI tools are introducing new SaaS security risks. Employees often misplace their trust in easily accessible GenAI tools to automate work, without

Apple's new iPad Pro is thinner than an iPod nano

Wednesday, May 8, 2024

The Morning After It's Wednesday, May 08, 2024. We kicked off our Tuesday with an early iPad event. And what a beastly iPad we got. Apple shook things up by slotting its brand-new M4 chip into its

Hijack Loader Malware Employs Process Hollowing, UAC Bypass in Latest Version

Wednesday, May 8, 2024

THN Daily Updates Newsletter cover Webinar -- The Future of Threat Hunting Is Powered by Generative AI From Data to Defense: Step Into the Next Era of Cybersecurity with CensysGPT Download Now