码迷,mamicode.com
首页 > 其他好文 > 详细

sq练习

时间:2018-03-09 11:15:20      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:分享   jpg   alt   core   最小   and   图片   gpo   group by   

1、技术分享图片

select date,id,sale, (select sum(sale) from sale where date <= T.date and id = T.id)  sum from sale T order by id;

2、技术分享图片

select name from sale group by name having min(score) > 80;(最小值都大于80)

select distinct name from sale where name not in (select name from sale where score < 80);

3、

sq练习

标签:分享   jpg   alt   core   最小   and   图片   gpo   group by   

原文地址:https://www.cnblogs.com/haley0125/p/8528428.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!