选择yearBrth,其中count(yearBrth)> 4

时间:2013-11-14 10:11:04

标签: phpmyadmin

如何从表列yearBrth中选择count(yearBrth)大于4(例如)

select 
    yearBrth
from 
    users 
where 
    count(yearBrth) > 4
-- group by yearBrth
;

1 个答案:

答案 0 :(得分:2)

使用having

select yearBrth
from users 
group by yearBrth having count(yearBrth) > 3