Queries that compute score based upon a function