SQL Query | Level – Basic
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways
Answers ( 3 )
SELECT COUNT (*) AS “Number of Employees”
FROM Employees
WHERE DOB BETWEEN ‘1960-01-01’ AND ‘1975-12-31’
GROUP BY sex;
This query will give me employee_count , Gender as output.
SELECT COUNT(1) as NumberofEmployees , sex
from Employees
WHERE DOB BETWEEN 01/01/1960 AND 31/12/1975.
GROUP BY sex
SELECT COUNT (*) AS No_of_Employees”
FROM Employees
WHERE DOB BETWEEN ‘CAST(1960-01-01’ as DATE) AND CAST(‘1975-12-31’ as DATE)
GROUP BY sex;