select countB)from A group by B order by B
SQL语句就可以做了,例检索表格aaa,添加一列“re_num”,显示a列值重复的次数,
次数为表格按a列分组计算记录数:
select a,count(a) as 're_num' from aaa group by a,
select a1.a2.re_num from
aaa a1
join
(select a,count(a) as 're_num' from aaa group by a) a2
on a1.a = a2.a
select sum(datac.COUNT_VALUE)
from T_JL_COUNT_DATA datac
, T_JL_XC_RESULT a
where datac.COUNT_NO=45 and a.id=datac.RESULT_ID。
ts = "select count(字段) allcount from table where ……'" set all = db.execute(ts) 显示次数 <%= all("allcount") %>欢迎分享,转载请注明来源:内存溢出
评论列表(0条)