Hello,

I am pulling information from a sales database by quarter and Employee ID.

So Far I use: 

<cfquery name="SalesQuery" datasource=SalesDB>
SELECT tblEmployee.ID,
    tblEmployee.Name,
    tblSales.SalesCreditAmount,
    tblSales.AccountLeader
FROM   tblEmployee INNER JOIN tblSales
ON    tblEmployee.ID = tblSales.ID
WHERE  tblEmployee.Name = '#URL.EmployeeName#' AND Quarter = '1'
</cfquery>

<cfquery name="SumQuery" dbtype="query">
SELECT sum(SalesCreditAmount) AS TotalSalesSUM
FROM   SalesQuery
</cfquery>

What I would like to do is 
1) pull all Employee sales for a given quarter and 2) sum them for the individual 
employees then 3) output the data using 
cfgraph to create a nice visual report for management.

Any ideas/thoughts on how to setup the sql to sum sales where ID is the same for 
Quarter 1
then output that sum as a cfgraph value?

Thanks for all input,

Dave

______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to