Number of Resort under each Manager
Each manager is assigned with a few resorts. Management wants to know how many resorts (rated 4 and above) assigned to each manager. Write a query to display the manager id and number of resort assigned to each of them. Give alias name to number of resort as “NUMBEROFRESORT”. Sort the result set in ascending order of manager id.
select managerID, count(resortid) as NUMBEROFRESORT from resort where starRating>=4 group by managerID order by managerID;