账单上的每一项都包含了产品的名称、购买了多少项产品,以及一种产品的价格。Float -- type chosen for simple arithmetictype Bill = [(Count, Product, Price)]
定义一个函数mostExpensive,它将返回产品名称和账单中最昂贵的条目的总成本(考虑购买了多少产品)。
我想从两张不同的桌子上买到最贵最便宜的东西。输出应为一行,其中包含MostExpensiveItem、MostExpensivePrice、CheapestItem、CheapestPrice的值。通过以下查询,我获得了两个表中最昂贵和最便宜的商品的价格: MAX(ExtrasPrice) as MostExpensivePrice, MIN(ExtrasPrice) as CheapestPrice( UNION ALL
SELECT