Select {客户消费单}.消费日期 As [日期],Sum(实收现金) As [销售额],Sum(数量*成本价格) As [成本额],Sum(实收现金)-Sum(数量*成本价格) As [利润] From ({客户消费} Inner JOIN {客户消费单} ON {客户消费单}.[_Identify] = {客户消费}.[消费单号]) Inner JOIN {商品资料} ON {商品资料}.[商品货号] = {客户消费}.[商品货号] Group By {客户消费单}.消费日期 Order By {客户消费单}.消费日期 DESC