An example of simplifying a lambda query