Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- YEAR ( created ) AS year,
- MONTH (created ) AS month,
- price,
- count( DISTINCT user_id ) AS usersCount
- FROM
- orders
- WHERE
- status = 'Processed'
- GROUP BY
- year,
- month,
- price
- ORDER BY
- year DESC,
- month DESC,
- price ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement