-- | Task: For each customer from some nation, compute the k orders with the
-- most lineitems.
topOrdersPerCust :: Text -> Integer -> Q [(Text, [Order])]
topOrdersPerCust n k =
    [ tup2 (c_nameQ c) (topK k (length . orderItems) (custOrders c))
    | c <- customers
    , c `custFromNation` n
    ]
topOrdersPerCust :: Text -> Integer -> Q [(Text, [Order])]
topOrdersPerCust n k =
    [ tup2 (c_nameQ c) (topK k (length . orderItems) (custOrders c))
    | c <- customers
    , c `custFromNation` n
    ]
topOrdersPerCust n k =
    [ tup2 (c_nameQ c) (topK k (length . orderItems) (custOrders c))
    | c <- customers
    , c `custFromNation` n
    ]