Question
What is the result of the following SQL query?
 SELECT department, COUNT (employee_id) FROM employees GROUPBY department HAVING COUNT (employee_id) > 5 ;Solution
Explanation: This query groups employee data by the department column and calculates the count of employees for each department using COUNT(employee_id) . The HAVING clause filters groups to include only those with a count greater than 5. The HAVING clause is specifically used for filtering after applying aggregate functions, unlike WHERE , which filters rows before aggregation. This query is commonly used in scenarios like resource allocation, workforce analysis, and performance reporting. Option A: The query does not display individual employee details, only aggregated department data. Option B: HAVING is valid with aggregate functions, provided it follows GROUP BY . Option D: This interpretation mixes individual and aggregated data, which is not possible here. Option E: The HAVING clause explicitly filters results, so this option is incorrect.
Fill in the blank given below using the correct idiom.
Susan decided to _______________ by joining the team of volunteers for the charity even...
In each of the following questions, an idiomatic expression/a proverb has been underlined – followed by four alternatives. Choose the one which best ...
Cool heels
His promotion is on the cards.
...Fill in the blank given below using the correct idiom.
Despite his _______________ in the company, his lack of experience led to poor decision...
Select the most appropriate meaning of the given idiom.
full of beans
Add insult to injury
The given idiom is followed by four meanings. Choose the one which best expresses the meaning of the given idiom.
To have an axe to grind
Be glad to see the back of
- Choose the option which best expresses the meaning of the idiom/phrase bold in the sentence.
The hotel claimed to have luxurious rooms, but when we...