I have the following SQL query and I need to have it in LINQ, I tried several things but I can not get it working.
Here is the SQL query