Repeat buyers by country
For each country, work out how many customers came back to buy again.
buyersis the number of customers in that country with at least one completed orderrepeat_buyersis how many of them have two or more completed ordersrepeat_rate = 100 * repeat_buyers / buyers, rounded to 1 decimal place- only include countries with at least one buyer. Guest orders (no customer) don't belong to any country.
output columns
countrybuyersrepeat_buyersrepeat_rateuses ,
ctrl + enter to run on the sample data · ctrl + shift + enter to submit
run your query to see the output here. Submit checks it against the sample data, hidden test cases, random data and a large dataset.