Answer the question
In order to leave comments, you need to log in
How to write a request correctly? Is an investment required?
it is necessary to select the data for today and for yesterday from the table for each id. I understand how to do this with two requests, but how can I merge it into one? Tell me please.
Answer the question
In order to leave comments, you need to log in
Something like this
SELECT
...
WHERE
DATE(`date`) >= DATE(DATE_SUB(NOW(), INTERVAL 1 DAY))
GROUP BY DATE(`date`)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question