1
I made the following consultation:
`select t.net, t.hora, t.`data`, t.`local` from domingos t
join(
select net, updated, count(*) from domingos
where `data` = '07/05/2017'
group by updated, net
having count(*) > 4
) as u
on t.updated = u.updated
and t.net = u.net
group by t.net, t.hora, t.`data`, t.`local`
order by hora;`
This query returns the values in the figure below
Is there any parameter for group by that makes it possible to group the values of the column hora
whereas, for example, the values 00:34:00 to 00:36:00 are represented by only one value?
then you would have to truncate the time, into whatever shape you want, or create a case for your condition.
– Rovann Linhalis
No, because different times refer to different devices, but different devices can have the same 'net'. Grouping by net would make me lose information about the number of devices. You see?
– Frank Queiroz
Okay... I’ll post
– Frank Queiroz