SELECT c.country, c.city, COUNT(o.Order_ID) AS c, SUM (COUNT(o.Order_ID)) OVER(partition BY c.country) AS s, MAX(COUNT(o.order_ID)) OVER(partition BY c.country) AS m FROM Customers c, Orders o WHERE c.Customer_ID = o.Customer_ID GROUP BY c.city, c.country;
Comments