Skip to content

Instantly share code, notes, and snippets.

@moshiurse
Created January 6, 2020 10:59
Show Gist options
  • Save moshiurse/78fd4ccea448099b2aba4141b1f17fc3 to your computer and use it in GitHub Desktop.
Save moshiurse/78fd4ccea448099b2aba4141b1f17fc3 to your computer and use it in GitHub Desktop.
Get top Bills from by week days
SELECT DAYNAME(inv_date+1), SUM(`total_cost`), COUNT(*) FROM `sales_invoice`
GROUP BY DAYNAME(inv_date)
ORDER BY SUM(`total_cost`) DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment