News:

SQL Table To C# Entity Model ConverterEntity Model (Class Properties) to SQL Table ConverterIf you encounter any trouble visiting our site, please contact us.

Advertisement

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;
enggid                int(4)
name                varchar(50)
salary                int(4)

You want to select the top 2 engineers in the decreasing order of their salaries, starting with the maximum salary. Which of the following SQL queries will fetch this data?

  1. SELECT TOP 2 * FROM engineers ORDER BY max(salary) DESC

  2. SELECT TOP 2 * FROM engineers ORDER BY salary DESC, GROUP BY salary

  3. SELECT TOP 2 * FROM engineers GROUP BY salary DESC

  4. SELECT TOP 2 * FROM engineers ORDER BY salary DESC

  5. SELECT TOP 2 [name], salary FROM engineers ORDER BY salary DESC

Answer: Answer is d, e
comments powered by Disqus
Advertisement

BCS Preparation now even more easy. ReadBD is the place where you can find all kind of resources to be successful in BCS,Bank,Islami Bank exam and interview.

Looking for job. Try JobLoader- First ever job search engine in Bangladesh. All open bd jobs now a single mouse click away.

;