AnsweredAssumed Answered

SQL CHART YEARLY SALES ERROR

Question asked by WilliamSouth on Oct 15, 2014
Latest reply on Oct 16, 2014 by WilliamSouth

Title

SQL CHART YEARLY SALES ERROR

Post

Trying to  make a chart for my yearly sales  by Month. I can it to work by day but when I try to group it  by MONTHNAME it dose not work. I get an error.

My Y AXIS

SELECT SUM(a."Subtotal")
FROM "Invoices" a
INNER JOIN "Invoice Data" b ON a."Invoice ID" = b."INVOICE ID MATCH FIELD"
WHERE YEAR(a."Date") = YEAR(CURDATE)
GROUP BY a."Date"

MY X AXIS

"SELECT MONTHNAME(Date)
FROM "Invoices" a
WHERE YEAR(a. "Date") = YEAR(CURDATE)
ORDER BY a.\"Date\" ASC
" ;

Outcomes