Group by, count distinct SQL query to IQueryable using Linq
I am trying to translate the following SQL into IQueryable, so I can access the result and filter on different conditions, before the data is retrieved from the database,
but I get an error that the LINQ query can’t be translated.