zoukankan      html  css  js  c++  java
  • mysql聚合函数

     
    聚合函数的操作 count(*)、max()、min()、avg()、sum()                                                                                                                   
    select count(*) from student;                                                  打印student表里的总个数,总人数                                 
    select count(*) from student where gender = '女';                    打印student表格里女生的人数                            
     select max(age) from student;                                                打印student表格里最大的年龄值                         
     select min(age) from student where gender = '女';                  打印student表格里女生的最小年龄值                              
     select sum(age) from student;                                                 打印student表格里年龄累加的和                         
     select avg(age) from student;                                                  打印student表格里平均年龄,显示浮点数               
  • 相关阅读:
    类成员之静态字段和普通字段、静态方法和普通方法
    类的导出
    面向对象之继承
    面向对象之封装
    面向对象与函数式的对比
    计算器
    模拟信用卡登录程序
    /etc/fstab
    解决 Your project contains error(s),please fix them before running your applica ..
    C#之SqlDependency数据库缓存
  • 原文地址:https://www.cnblogs.com/sunzhiqi/p/10072678.html
Copyright © 2011-2022 走看看