子查询去重算总数,不支持ToAggregate吗? #2176
Closed
coolqingcheng
started this conversation in
General
Replies: 2 comments
-
|
换成groupby好像也不行,提示错误 |
Beta Was this translation helpful? Give feedback.
0 replies
-
await fsql.Select<AlumniSubject>().Where(a => a.Id == model.Id).FirstAsync(a => new WxHomeDataModel
{
RaisedAmount = fsql.Select<AlumniRecord>().Where(x => x.SubjectId == a.Id).First(x => SqlExt.DistinctCount(x.Key.AccountId))
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
我现在的查询是
然后就报错了,提示
FreeSql: Function expression value(ADS.Api.Client.WxRouter+<>c__DisplayClass0_0).fsql.Select().Where(x => (x.SubjectId == a.Id)) parsing not implemented 堆栈: at FreeSql.Internal.CommonExpression.ExpressionLambdaToSql(Expression exp, ExpTSC tsc)\r\n at FreeSql.Sqlite.SqliteExpression.<>c__DisplayClass1_0.b__0(Expression exparg)\r\n at FreeSql.Sqlite.SqliteExpression.ExpressionLambdaToSqlOther(Expression exp, ExpTSC tsc)\r\n at FreeSql.Internal.CommonExpression.ExpressionLambdaToSql(Expression exp, ExpTSC tsc)\r\n at FreeSql.Internal.CommonExpression.ReadAnonymousField(List
1 _tables, Func3 _tableRule, StringBuilder field, ReadAnonymousTypeInfo parent, Int32& index, Expression exp, Select0Provider select, BaseDiyMemberExpression diymemexp, List1 whereGlobalFilter, List1 findIncludeMany, List1 findSubSelectMany, Boolean isAllDtoMap)\r\n at FreeSql.Internal.CommonExpression.ReadAnonymousField(List1 _tBeta Was this translation helpful? Give feedback.
All reactions