Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error en daily and monthly #54

Open
johnny1cr opened this issue Jun 1, 2020 · 0 comments
Open

Error en daily and monthly #54

johnny1cr opened this issue Jun 1, 2020 · 0 comments

Comments

@johnny1cr
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant