mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 完善 GroupBy count(b.id) 指定字段统计;
This commit is contained in:
		@@ -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)})";
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user