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 10:43AM

On the dataset you first posted, the suggested query yields ...

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

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.