Fixed query for revenue calculations to only get number of times that are bought by cash