TASK #240 · Medium · WallapopChat-to-Sale Conversion
Your brief
Before buying, Wallapop users message the seller: each row in chats is a
conversation of buyer buyer_id about listing listing_id. A chat converted
into a sale if the listing was sold to exactly that buyer (listings.buyer_id
equals chats.buyer_id).
Write a query that for each listing category returns category, the number of chats chats, the number of chats that converted into a sale converted_chats, and their percentage of all chats in the category conversion_pct, rounded to two decimals.
Write a query that for each listing category returns category, the number of chats chats, the number of chats that converted into a sale converted_chats, and their percentage of all chats in the category conversion_pct, rounded to two decimals.
Ctrl / ⌘ + ↵
Result
Write a query and run it to see the results.
Schema
usersuser_id, user_name, city, signup_datelistingslisting_id, seller_id, title, category, price, published_date, sold_date, buyer_idchatschat_id, listing_id, buyer_id, started_date