sq练习

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、

posted @ 2018-03-09 10:51  兔子兔子0125  阅读(102)  评论(0编辑  收藏  举报