摘要: 1、group by select 类别, sum(数量) as 数量之和 from A group by 类别 select 类别, sum(数量) AS 数量之和 from A group by 类别 order by sum(数量) desc 阅读全文
posted @ 2021-09-13 12:49 keep2021 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 1、内连接 inner join JOIN 相当于INNER JOIN内连接,不满足on 的条件过滤掉,不显示 eg: select * from student s inner join class c on s.class_id = c.id 2、左连接 left join 以左边数据为主,不满 阅读全文
posted @ 2021-09-13 11:50 keep2021 阅读(598) 评论(0) 推荐(0) 编辑