Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 selecting the most sales

Author  Topic 

Teareal
Starting Member

3 Posts

Posted - 2012-05-04 : 20:00:48
I am using SQL Server 2008 R2 and I have a DB with 4 tables (Customer, SalesPerson, Vehicle, and SalesPerson_Vehicle_Bridge) I am trying to determine which sales person has the most sales in a given month. The SalesPerson table has fields: Sales_Person_ID, Name, and a couple other irrelevant to this. The Vehicle table has: VIN, Purchase_Date and a few others that are irrelevant also. The SalesPerson_Vehicle_Bridge table has: Sales_Person_ID, VIN, and Profit. I am not sure where to even begin to determine which salesperson has the most sales for a given month. Any advice would be greatly appreciated.

Vinnie881
Master Smack Fu Yak Hacker

1231 Posts

Posted - 2012-05-04 : 22:50:56
PLease post a question like this using the advice in the below link:

http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Success is 10% Intelligence, 70% Determination, and 22% Stupidity.
\_/ _/ _/\_/ _/\_/ _/ _/- 881
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-05-05 : 01:40:52
duplicate of

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=174338

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -