Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Write a query to display the designation and the number of users who are currently

working in each designation, sorted by designation. Give an alias as


designation_count.

Write a query to display the year and the number of events scheduled in each year,
sorted by year. Give an alias as number_of_events.

Write a query to display the role name and the count of users in each role(Give an
alias as role_count), sorted by name. Display only the roles in which there is
atleast 1 user.

Write a query to display the name of all alumni user(s) (Role-'Alumni') and the
number of companies in which each user has worked in (Give an alias as
company_count), sorted by user name.

ok,so one thing more if in any query along with the count ,if query statement
consist of the word EACH

then also its a hint to use group by

You might also like