cars_table
.groupby('Origin')
.rollup({
count: d => op.count(),
med_cylinders: d => op.median(d.Cylinders),
min_year: d => op.min(op.year(d.Year)),
max_year: d => op.max(op.year(d.Year)),
avg_mpg: d => op.mean(d.Miles_per_Gallon),
avg_displacement: d => op.mean(d.Displacement)
})
.orderby(aq.desc('count'))
.view()