db2语句 这两个语句的结果可以合并成一句sql么
SELECTcolname,COUNT(1)ASaFROMtablename1GROUPBYcolnameORDERBYaDESCfetchfirst3rowsonlyS...
SELECT colname, COUNT(1) AS a FROM tablename1 GROUP BY colname ORDER BY a DESC fetch first 3 rows only
SELECT colname, COUNT(1) AS a FROM tablename2 GROUP BY colname ORDER BY a DESC fetch first 3 rows only 展开
SELECT colname, COUNT(1) AS a FROM tablename2 GROUP BY colname ORDER BY a DESC fetch first 3 rows only 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询