Click here to Skip to main content
15,922,894 members
Home / Discussions / C#
   

C#

 
GeneralBinding to a property Pin
peterchen29-Dec-07 14:30
peterchen29-Dec-07 14:30 
GeneralMySql & C# Question ... pulling data Pin
shadowhazard29-Dec-07 9:59
shadowhazard29-Dec-07 9:59 
GeneralRe: MySql & C# Question ... pulling data [modified] Pin
shadowhazard29-Dec-07 11:27
shadowhazard29-Dec-07 11:27 
GeneralRe: MySql & C# Question ... pulling data Pin
Justin Perez29-Dec-07 14:00
Justin Perez29-Dec-07 14:00 
GeneralRe: MySql & C# Question ... pulling data Pin
shadowhazard29-Dec-07 17:16
shadowhazard29-Dec-07 17:16 
GeneralRe: MySql & C# Question ... pulling data Pin
Mark Churchill30-Dec-07 15:59
Mark Churchill30-Dec-07 15:59 
GeneralRe: MySql & C# Question ... pulling data Pin
shadowhazard30-Dec-07 17:30
shadowhazard30-Dec-07 17:30 
QuestionAny query about northwind? Pin
omegazafer29-Dec-07 9:44
omegazafer29-Dec-07 9:44 
Hi friends,

I have a homework, i worked for hours but I got stuck in a point. I can't go out of this point.

I am very glad if you can help me.

I make effort to get a query from from northwind database sample. I want max sales of employees according to product.

There are 9 employees(sales persons). There are 77 products type. Salespersons sell this products. I want ,which product was sold maximumly according to sales turnover. The result must be like below



salesperson product sales amount

salesperson1 product a x

salesperson2 product b y

. .

. . .

.

salesperson9 product h w.



I tryed below script, I can find max sales of each salespersons but I can't add productname column to this query.

select t.firstname,t.lastname,max(t.sales) as sales

from (select employees.Firstname,employees.lastname,products.productname,

sum("order details".unitprice*quantity*(1-discount)) as Sales from ((Employees inner join orders on employees.employeeID=orders.employeeID) inner join "order details" on orders.orderID="order details".orderID) inner join products on products.productID="order details".productID

group by employees.lastname,employees.firstname,products.productname

) as t

group by t.firstname,t.lastname

order by t.firstname



Good DAys

Regards
AnswerRe: Any query about northwind? Pin
Paul Conrad30-Dec-07 6:44
professionalPaul Conrad30-Dec-07 6:44 
GeneralRe: Any query about northwind? Pin
omegazafer30-Dec-07 10:09
omegazafer30-Dec-07 10:09 
GeneralRe: Any query about northwind? Pin
Paul Conrad30-Dec-07 10:30
professionalPaul Conrad30-Dec-07 10:30 
GeneralRe: Any query about northwind? Pin
omegazafer30-Dec-07 10:57
omegazafer30-Dec-07 10:57 
Generali need your help ....am stuck Pin
netJP12L29-Dec-07 9:40
netJP12L29-Dec-07 9:40 
GeneralA little problem Pin
zeeShan anSari29-Dec-07 8:28
zeeShan anSari29-Dec-07 8:28 
AnswerRe: A little problem Pin
Guffa29-Dec-07 9:03
Guffa29-Dec-07 9:03 
GeneralRe: A little problem Pin
Rich Insley29-Dec-07 9:08
Rich Insley29-Dec-07 9:08 
QuestionGetting handle to browser window? Pin
cakewalkr729-Dec-07 3:30
cakewalkr729-Dec-07 3:30 
GeneralRe: Getting handle to browser window? Pin
Scott Dorman29-Dec-07 3:59
professionalScott Dorman29-Dec-07 3:59 
GeneralException handling scenario Pin
beatles169229-Dec-07 1:23
beatles169229-Dec-07 1:23 
GeneralRe: Exception handling scenario Pin
Luc Pattyn29-Dec-07 1:58
sitebuilderLuc Pattyn29-Dec-07 1:58 
Generalmake binary file Pin
zafax_28-Dec-07 22:47
zafax_28-Dec-07 22:47 
GeneralRe: make binary file Pin
Colin Angus Mackay29-Dec-07 2:40
Colin Angus Mackay29-Dec-07 2:40 
GeneralRe: make binary file Pin
Scott Dorman29-Dec-07 3:35
professionalScott Dorman29-Dec-07 3:35 
GeneralRe: make binary file Pin
zafax_29-Dec-07 3:55
zafax_29-Dec-07 3:55 
GeneralRe: make binary file Pin
Scott Dorman29-Dec-07 4:01
professionalScott Dorman29-Dec-07 4:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.