Querying the same data on different dates

1

I'd like to know how I can bring some DB data. Such as customer name, ID and date. In the company I work with, there are some Service Orders, but some of these OSs are of the same customer (same client but different OS). The company wants to know if this customer came back in less than 24hrs to make a new OS. How can I do this?

SELECT id,cliente_id,
DATE_FORMAT(datcriacao, '%d-%m-%Y'),
count(cliente_id)
FROM sis_ordem_servico
group by cliente_id
order by id

This is what I have for now, but it is only bringing the date of an OS and not all of them as I need.

    
asked by anonymous 08.08.2016 / 15:23

0 answers