May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.
SELECT Job.Jobid, Job.company, Job.wellname, Job.rig, Job.rignumber, Job.onlocationdatetime, Job.offlocationdatetime, sfrentaldays * sfrentalrate + wfrentaldays * wfrentalrate + rigupcharge + rigdowncharge + numberoftools * toolredresscharge + sfinsurancedays * sfinsurancerate + wfinsurancedays * wfinsurancerate + servicemandays * servicemanrate - creditdays * creditrate + othercharges + SFStandByDays * SFStandByRate + WFStandByDays * WFStandByRate AS 'Total' , SUM(Total) as 'GrandTotal' <---------this is what I tried but it said no "Total" in the field list FROM Job INNER JOIN JobRentalTicket ON Job.Jobid = JobRentalTicket.Jobid WHERE Job.Jobcomplete = 1 AND JobRentalTicket.invictussentinvoicetoagent = 0 AND Job.offlocationdatetime BETWEEN '2012-01-01 00:00:00' AND '2014-12-31 23:59:59' ORDER BY Job.company
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.