SELECT t.订单编号, t.客户姓名,t.客户电话, sum(t.购买数量) as 购买数量总和, date(julianday(t.订购日期)+2415019,"localtime") as 订购日期 FROM demo_销售明细 t group by t.订单编号 order by t.订单编号
参考:https://gcdn.grapecity.com.cn/showtopic-170835-1-1.html
SELECT t.订单编号, t.客户姓名,t.客户电话, sum(t.购买数量) as 购买数量总和, date(julianday(t.订购日期)+2415019,"localtime") as 订购日期 FROM demo_销售明细 t group by t.订单编号 order by t.订单编号