开发者

number of row that repeated

table tbl1

field id,name

id=1 name=a

id=1 name=a

id=1 name=w

id=1 name=f

id=2 name=c

id=2 name=a

how can get number of field repeated. i开发者_运维知识库d=1 ,name=a ==>2


it's simple

select
  id,
  name,
  count(*)
from
  table
group by
  id, name
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜