use ampersand #to_proc syntax in query example