- 完善 GroupBy count(b.id) 指定字段统计;

This commit is contained in:
28810
2020-04-08 16:19:14 +08:00
parent 7c55f09d47
commit fa59a6e3e8
16 changed files with 178 additions and 144 deletions

View File

@ -702,7 +702,7 @@ namespace FreeSql.Internal
//}
switch (exp3.Method.Name)
{
case "Count": return "count(1)";
case "Count": return exp3.Arguments.Count == 0 ? "count(1)" : $"count({ExpressionLambdaToSql(exp3.Arguments[0], tsc)})";
case "Sum": return $"sum({ExpressionLambdaToSql(exp3.Arguments[0], tsc)})";
case "Avg": return $"avg({ExpressionLambdaToSql(exp3.Arguments[0], tsc)})";
case "Max": return $"max({ExpressionLambdaToSql(exp3.Arguments[0], tsc)})";