mysql - SQL select rows having count > certain number -
i don't know how search this, it's quite easy it, don't know how this. have sql table:
| c1 | c2 | c3 | c4 | c5 | data data data data data
so i've 5 columns, , want select rows following (c1, c2, c3) row appears more 5 times in table this:
select c1, c2, c3 table having count(*) > 5 , (all in count, rows must have same values on c1, c2, c3)
can basical sql queries. functions, declarations , etc not allowed. don't know if i'm explaining myself well.
not absolutely sure understand, guess be
select c1, c2, c3 <yourtable> group c1, c2, c3 having count(*) > 5
Comments
Post a Comment