摘要: #select 表达式会进行判断 如果符合条件,会返回一个1或者0,所以这儿用来如果<60则返回1#只需要把返回的加起进行比较,如果大于2,则不满足条SELECT name,sum(score<60) as gk,AVG(score) from result GROUP BY name having 阅读全文
posted @ 2017-09-24 17:35 王者之笔 阅读(680) 评论(0) 推荐(0) 编辑
摘要: 平均数 select avg(shop_price) from goods; 求最大最小 select min(shop_price) from goods; select max(shop_price) from goods; 求行数 select count(*) from goods; 分组统 阅读全文
posted @ 2017-09-24 16:27 王者之笔 阅读(189) 评论(0) 推荐(0) 编辑