标签:where order by 排列 数据 sum 指定 pre 获取 顺序
顺序:
(从此处开始可以使用select中指定的别名)
select
sum(goods.number)
from order
left join goods on goods.order_id = order.id
where
order.status=1
group by order.user_id
having order.add_time > ‘2019-08-27 00:00:00‘
order by goods.number desc
标签:where order by 排列 数据 sum 指定 pre 获取 顺序
原文地址:https://www.cnblogs.com/UniqueColor/p/11417553.html