Last active
December 15, 2015 19:18
-
-
Save GreatPotato/5309994 to your computer and use it in GitHub Desktop.
LemonStand average shipping quote per country
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT t2.name AS 'Country name', ROUND(AVG(t1.shipping_quote), 2) AS 'Average shipping price' | |
FROM shop_orders t1 | |
LEFT JOIN shop_countries t2 | |
ON t1.shipping_country_id = t2.id | |
WHERE t1.status_id != 1 | |
GROUP BY(t2.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment