kinsesyete Posted January 18, 2014 Share Posted January 18, 2014 I want to show the Total Invoices per Month by Job Type, but it seems that it is shwoing the monthly total. I just want to show the total per job type.Here's what I've done so far:select `vinvoices`.`yymm` AS `yymm`,`vinvoices`.`location` AS `job_location`,`vinvoices`.`job_no` AS `job_no`,format(sum(`vinvoices`.`amount`),0) AS `amount`,`tjobtypes`.`type_name` AS `type` from ((`vinvoices` join `tjobs` on((`tjobs`.`job_no` = `vinvoices`.`job_no`))) join `tjobtypes` on((`tjobtypes`.`type_no` = `tjobs`.`type_no`))) group by `vinvoices`.`yymm`,`vinvoices`.`location`Here are the fields for vinvoices:- date- job_no - this connects to jobtypes field via the tjobs table- job_name- client_name- amount- ppaid- inv_no- prob- notes- contact- location- yymm Link to comment https://forums.phpfreaks.com/topic/285468-mysql-per-job-type/ Share on other sites More sharing options...
Barand Posted January 18, 2014 Share Posted January 18, 2014 I want to show the Total Invoices per Month by Job Type Then GROUP BY job_type, month Link to comment https://forums.phpfreaks.com/topic/285468-mysql-per-job-type/#findComment-1465661 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.