view sales for current date only

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am trying to get a query to come up with the salesperson and add up
the total sales for the current date. How do i do this. SQL is fine.

Thanks Michael. Your help is appreciated
 
stuck! again! said:
Hi,
I am trying to get a query to come up with the salesperson and add up
the total sales for the current date. How do i do this. SQL is fine.

Thanks Michael. Your help is appreciated

stuck! again!,

Here is one possibility:

SELECT SP1.Salesperson
,SUM(S1.Sales)
FROM Salespersonnel AS SP1
INNER JOIN
Sales AS S1
ON SP1.Salespersonnel = S1.Salespersonnel
WHERE S1.Salesdate = Date()


Sincerely,

Chris O.
 
Chris2 said:
stuck! again!,

Here is one possibility:

SELECT SP1.Salesperson
,SUM(S1.Sales)
FROM Salespersonnel AS SP1
INNER JOIN
Sales AS S1
ON SP1.Salespersonnel = S1.Salespersonnel
WHERE S1.Salesdate = Date()


Sincerely,

Chris O.

Oops.

That should be:

SELECT SP1.Salesperson
,SUM(S1.Sales)
FROM Salespersonnel AS SP1
INNER JOIN
Sales AS S1
ON SP1.Salespersonnel = S1.Salespersonnel
WHERE S1.Salesdate = Date()
GROUP BY SP1.Salesperson


Sincerely,

Chris O.
 
Back
Top