SELECT bl.name location,COUNT(DISTINCT t.contact_id) visitors,COUNT(DISTINCT CASE WHEN t.type="sell" THEN t.id END) sales,COUNT(DISTINCT CASE WHEN t.type="sell" THEN t.id END)*100.0/COUNT(DISTINCT t.contact_id) conversion_rate FROM business_locations bl JOIN transactions t ON bl.id=t.location_id GROUP BY bl.id,bl.name ORDER BY conversion_rate DESC;