Question
Which of the following query will return the
third-highest salary from an Employee table in SQL?Solution
To get the third-highest salary, the query SELECT salary FROM Employee ORDER BY salary DESC LIMIT 1 OFFSET 2; fetches the salary value after skipping the top two highest salaries. The outer query ensures that we only get the third-highest salary. Why Other Options are Wrong: a) Incorrect usage of LIMIT; it should be OFFSET 2 instead of LIMIT 2, 1. b) This would return multiple rows or result in an error. c) DISTINCT is unnecessary and could result in wrong data if multiple employees have the same salary. e) This query would return the first three salaries in ascending order, not the third-highest.
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...