Use QUEL?
range of c is cars
retrieve (avg(c.price) where c.brand = 'BMW' by c.year) range of c is cars
retrieve (avg(c.price) where c.brand = 'BMW' by c.year)I suppose if your example is using a NoSQL (meaning non-relational) database, that is ironically queried using SQL, then you might need something else. But my understanding is that we're back on the relational kick these days.