S
S
snake22022-03-22 15:05:11
SQL
snake2, 2022-03-22 15:05:11

How to get ordered statistics?

SELECT distinct(o.delivery_date), sum(ob.price) FROM orders as o
JOIN orders_bills as ob
    ON o.id = ob.order_id
WHERE o.delivery_date BETWEEN '2022-03-11' AND '2022-03-21'


How to make the answer be in the line
2022-03-11 100
2022-03-12 200
2022-03-13 159
................. ......
2022 -03-21 323

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question