Count lines and products
agg produces a one-row summary. count("*") counts every row; count(column) skips nulls and countDistinct counts distinct non-null values. There are nine order lines, but products can appear on more than one line. None of these expressions sums quantity.