You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
monthly_sales.php
SELECT s.qty, DATE_FORMAT(s.date, '%Y-%m-%e') AS date,p.name,SUM(p.sale_price * s.qty) AS total_saleing_price FROM sales s LEFT JOIN products p ON s.product_id = p.id WHERE DATE_FORMAT(s.date, '%Y' ) = '2020' GROUP BY DATE_FORMAT( s.date, '%c' ),s.product_id ORDER BY date_format(s.date, '%c' ) ASC
daily_sales.php
SELECT s.qty, DATE_FORMAT(s.date, '%Y-%m-%e') AS date,p.name,SUM(p.sale_price * s.qty) AS total_saleing_price FROM sales s LEFT JOIN products p ON s.product_id = p.id WHERE DATE_FORMAT(s.date, '%Y-%m' ) = '2020-06' GROUP BY DATE_FORMAT( s.date, '%e' ),s.product_id
The text was updated successfully, but these errors were encountered:
Hi, i have this error in
monthly_sales.php
SELECT s.qty, DATE_FORMAT(s.date, '%Y-%m-%e') AS date,p.name,SUM(p.sale_price * s.qty) AS total_saleing_price FROM sales s LEFT JOIN products p ON s.product_id = p.id WHERE DATE_FORMAT(s.date, '%Y' ) = '2020' GROUP BY DATE_FORMAT( s.date, '%c' ),s.product_id ORDER BY date_format(s.date, '%c' ) ASC
daily_sales.php
SELECT s.qty, DATE_FORMAT(s.date, '%Y-%m-%e') AS date,p.name,SUM(p.sale_price * s.qty) AS total_saleing_price FROM sales s LEFT JOIN products p ON s.product_id = p.id WHERE DATE_FORMAT(s.date, '%Y-%m' ) = '2020-06' GROUP BY DATE_FORMAT( s.date, '%e' ),s.product_id
The text was updated successfully, but these errors were encountered: