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.
Study the given pattern carefully and select the number that can replace the question mark (?) from the given alternatives.Â
If the following words are arranged according to their order in the English dictionary, which of the following words will come last?Â
1) Shearin...
In a theatre, there are 20 seats in the front row and 30 rows were allotted. Each successive row contains two additional seats then its front row. How ...
Arrange the following words in their meaningful order according to the dictionary.Â
1. Epicanthus, epicardial, epicardium, epicalysesÂ
2...
Solve the following as per the given conditions using BODMAS: If A means ‘-’, B means ‘÷’, C means ‘+’ and D means ‘×’.Â
24 B<...
Statement:
A. Some elephants are whales.
B. Some fish are giraffe.
C. All giraffes are lions.
Conclusion:
(I) Som...
Just as Norway is related to Oslo, Kenya is related to _____.Â
Following the word given in the question, four more words are given in the options, one of which cannot be formed using the letters of the word given in...
In a certain code language, 'TRUCK' is written as 'UQVBL'. How will 'STAND' be written in that code language? Â
A student can type 21 pages in 15 minutes. At the same rate, how long will it take the student to type 84 pages?