December 17, 2003 at 2:19 am
Your company is about to layoff 5 percent of its sales force and you have been tasked with the morbid task of determining which of your salespeople are poor performers. To do this, you're required to find the bottom 5% of your sales force based on their total sales (TOTAL_SALES column). What T-SQL statement would accomplish this?
As per this Q. they want to have a list of 5% of people who have poor performance.
But as per the Answer
SELECT TOP 5 PERCENT FIRST_NAME, LAST_NAME
FROM Sales ORDER BY TOTAL_SALES DESC
This will give wrong answer because it will fetch those records which will have maximum Total_Sales because of this "ORDER BY TOTAL_SALES DESC ".
Please correct me if I am wrong.
Sudhir Chawla
Sudhir Chawla
December 17, 2003 at 2:22 am
No, you're not wrong, but please use this thread to complain
http://www.sqlservercentral.com/forum/link.asp?TOPIC_ID=19291
Frank
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
December 18, 2003 at 1:53 am
But this one has the correct date
Keith Henry
DBA/Developer/BI Manager
Keith Henry
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply