Start learning 50% faster. Sign in now
This query uses a subquery to find the maximum salary and excludes it using NOT IN. The outer query then finds the maximum salary among the remaining values, effectively identifying the second highest salary. • Why this works: The subquery isolates the highest salary. The outer query ensures the second highest value is identified without requiring an OFFSET. This method works across most SQL systems and avoids platform-specific syntax like LIMIT or TOP. ________________________________________ Why Other Options Are Incorrect: 1. LIMIT 2: Returns two highest salaries but doesn’t isolate the second highest. 2. OFFSET 1: Many SQL platforms do not support LIMIT ... OFFSET or require modifications for accurate execution. 3. DISTINCT Salary: Redundant use of DISTINCT, which is unnecessary when ORDER BY already ensures unique ordering. 4. TOP 2: TOP is SQL Server-specific and requires additional filtering for the second value.
For a =-4 and b = 5, value of a² – b² is:
A train can cross a pole, a bridge of 720 meter long and platform of 640 meter long in 9 seconds, _____ seconds and 25 seconds, respectively.
The...
If for non-zero x, x² - 4x - 1 = 0, what is the value of x² + 1/x²?
√(92×8 ×52+700) = ?
In a class of 70 students and 25 teachers, each student got gifts that were 20% of total number of students and each teacher got gifts that were 10% of ...
If x2 – 5x + 1 = 0, then find the value of {x2 + (1/x2)}.