MySQL Forums
Forum List  »  Newbie

Re: Query for finding count of records that have count(fieldname) > 100
Posted by: Peter Brawley
Date: February 11, 2019 07:16PM

Well then wrote an outer query to count that ...

select event_time, count(*) as count
from (
  select event_time, signature, count(*) N 
  from t 
  group by event_time, signature
  having N > 2
) repeats
group by event_time;
+------------+-------+
| event_time | count |
+------------+-------+
| 2019-02-10 |     2 |
| 2019-02-11 |     1 |
+------------+-------+

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.