Finds the first value of the given key from the given query.