TASK #193 · Hard · Kolesa GroupView-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.
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.
Ctrl / ⌘ + ↵
Result
Write a query and run it to see the results.
Schema
listingslisting_id, category, city, pricesearchessearch_id, user_id, used_filters, search_datelisting_viewsview_id, search_id, listing_id, user_idcontactscontact_id, view_id, user_id