

DROP VIEW IF EXISTS COUNTRY_DATA;


CREATE VIEW COUNTRY_DATA    
(Name, Region, Customers) 
AS       
  SELECT COUNTRY.Name, REGION.Name, COUNT(*)      
  FROM COUNTRY JOIN REGION USING(RegionId) JOIN CUSTOMER ON(CUSTOMER.Country=COUNTRY.Name)    
  GROUP BY COUNTRY.Name     
  ORDER BY COUNTRY.Name 
;