查询组合一个字段
select FAccountDate, count(1) from mydb.mytable where FGood = 1 group by FaccountDate;查询组合两个字段
select FAccountDate, FType, count(1) from mydb.mytable where FGood = 1 group by FaccountDate, FType;
SQL查询技巧:组合字段
本文将介绍如何在SQL查询中组合使用多个字段,通过示例展示如何使用GROUP BY子句来聚合数据,并且深入探讨了如何组合使用单个和多个字段进行复杂查询。
查询组合一个字段
select FAccountDate, count(1) from mydb.mytable where FGood = 1 group by FaccountDate;查询组合两个字段
select FAccountDate, FType, count(1) from mydb.mytable where FGood = 1 group by FaccountDate, FType;
2554
20万+
7129
2553
8347

被折叠的 条评论
为什么被折叠?