sqlkata / querybuilder

SQL query builder, written in c#, helps you build complex queries easily, supports SqlServer, MySql, PostgreSql, Oracle, Sqlite and Firebird
https://sqlkata.com
MIT License
3.06k stars 499 forks source link

Distinct AsCount error #702

Open WimAtIHomer opened 6 months ago

WimAtIHomer commented 6 months ago

I have a query with joins and a select distinct for some columns. The query gives normal results, but when I want to get a count of the query with await query.AsCount().GetAsync(); I get the error: The column 'Id' was specified multiple times for 'countQuery'

Any suggestions how to solve this?