冰江寒彻骨吧 关注:2贴子:95
  • 3回复贴,共1
select c_Gender 性别, count(c_Gender) 有多少个
from Customers
group by c_Gender
--查询Customers表中男女多少个


1楼2014-10-20 15:49回复
    select StudentNo 学号,AVG(StudentResult) 平均分
    from Result
    group by StudentNo
    having AVG(StudentResult)>=90
    --每名学生的4科成绩的平均分取90分以上


    2楼2014-10-20 16:33
    回复
      120页4 5题
      select c_ID 会员号,SUM(o_Sum) 下单总额
      from Orders
      group by c_ID
      having SUM(o_Sum)>AVG(o_Sum)
      select o_Date 下单日期,SUM (o_Sum) 下单总额
      from Orders
      group by o_Date
      order by SUM (o_Sum) desc


      3楼2014-10-20 16:48
      收起回复