Brug GROUP BY:
select value, count(*) from table group by value
Brug HAVING til at reducere resultaterne yderligere, f.eks. kun værdier, der forekommer mere end 3 gange:
select value, count(*) from table group by value having count(*) > 3
Brug GROUP BY:
select value, count(*) from table group by value
Brug HAVING til at reducere resultaterne yderligere, f.eks. kun værdier, der forekommer mere end 3 gange:
select value, count(*) from table group by value having count(*) > 3