Query by aggregates

Still not clear enough.