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.
- Choose the appropriate word or phrase from the options given to fill in the blanks.
The manager was known for taking swift action whenever any issu... Choose the correct alternative out of the four choices given below each sentence.
The election different ____ mine.
The chairman will ---------- over an audience of architects and developers.
He felt _____________ than he had for a long time.
Select the correct homonym from the given options to fill in the blank.
The wind________ so powerfully that the windows closed.
Ramesh needs to go into a deep ___________ in order to chalk out a fruitful plan for the future.
(A) discussion ...
Children of a perfectionist’s parent ___ up being constantly ____ for their inadequate performance.
Right on the edge facing the valley, the two-storey modernist house _____ the scenic ambience.
The company offered me a higher salary or more leaves and I chose the ____________.
The journalists have _________ that spying has caused serious _________ on the rights to free speech and privacy.