RienSQL
TASK #193 · Hard · Kolesa Group

View-to-Contact Conversion by Category

Your brief
The listings table stores listings (listing_id, category, city, price). The listing_views table stores listing openings (view_id, listing_id), and the contacts table stores seller contacts (contact_id, view_id — the originating view).

For each category compute how often a listing view leads to contacting the seller.

Output category, views (number of views), contacts (number of contacts) and contact_rate (the share of views that ended in a contact, as a percentage rounded to two decimals). Sort by contact_rate descending, breaking ties by category ascending.
Expected columnscategory views contacts contact_rateKolesa — listings funnel
SQL editor
SQLite
Ctrl / ⌘ + ↵
Result

Write a query and run it to see the results.

Schema
listingslisting_id, category, city, price
searchessearch_id, user_id, used_filters, search_date
listing_viewsview_id, search_id, listing_id, user_id
contactscontact_id, view_id, user_id