I have the following tables
Pedal
Brand:string
Classification:string
Model:string
Variety
Title:string
name:string
pedal_id:integer
Example
quality:string
price:double
variety_id:integer
I would like to find the average price based on brand, model, and quality. I cannot figure out the way in which I would do this from the Pedal model.
I don’t know if Rails 3.1 actually can do this properly,
but you should just be able to do,