I am trying to translate the following query from sql to EF Core. I can easily just use a stored procedure (I already have the sql), but am trying to learn how some of the l