Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------------------------------------------------
- | provider id| 1-1-2019 | 1-1-2019 | 1-1-2019 | 1-1-2019 | -> dynamic
- ----------------------------------------------------------
- | 5 | 5 | 3 | 9 | 8 |
- ----------------------------------------------------------
- | 18 | 11 | 56 | 79 | 34 |
- ----------------------------------------------------------
- select `providers`.`id`,(select `orders`.c
- from `orders`,`providers`
- where
- `orders`.`providerId` = `providers`.`id`
- and
- `orders`.`createdAt` >= "2019-01-01 00:00:00"
- GROUP BY `providers`.`id`;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement