Answer the question
In order to leave comments, you need to log in
MySQL. How to query for date range?
Hello.
There is a request like this:
SET @mydate='2019-05-15 22:00:00';
SELECT COUNT(*) AS count,@mydate AS mydate FROM(
SELECT * FROM ticket th WHERE th.start_time < @mydate GROUP BY tid DESC
) AS t2 WHERE t2.state NOT IN (2,3,9) AND t2.queue = 1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question