关于统计语句的写法 表如下 f1aaaaaabbbbccaaacc统计每个f1的个数,得到如下表f1 countaaa 3bb 2cc 2 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select f1,COUNT(1) count from table group by f1 select f1,COUNT(1) count from table group by f1 --直接来select f1,count(1) f1cnt from tb group by f1 select f1,COUNT(*) count from table group by f1楼上均正解 加个条件,f1属于table2的,该怎么写 select a.f1,COUNT(1) count from table a where exists(select 1 from table2 where a.f1=f1) group by a.f1 安装oracle9i时 警告日志不断出现的错误ORA-942 一条关于日期算法的sql语句? ORA-01041 internal error. HOSTDEF extension does not exist是怎么回事? oracle字符串比较问题 listener.ora中的参数的问题? 熟悉pl/sql developer的进来帮个忙,谢谢。 为什么只显示一条记录?? TO_NUMBER函数怎么用? 关于对CLOB字段的模糊检索,在线等待!! 给值为null的所有记录重新赋值 hibernate 或者 sql查询
select f1,COUNT(1) count from table group by f1
--直接来
select f1,count(1) f1cnt from tb group by f1
楼上均正解
select a.f1,COUNT(1) count from table a where exists(select 1 from table2 where a.f1=f1) group by a.f1