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表格里平均年龄,显示浮点数               
  • 相关阅读:
    Python——PYQT:控件基本使用
    Python——GUI编程 利息计算器 作业9(python programming)
    Python——GUI编程(python programming)
    weblogic 8.1教程之部署(三)
    iOS CocoaPods安装和使用图解
    黑马day11 事务的四大特性
    实现按条件查询
    hdu 1078 FatMouse and Cheese【dp】
    Android-风格和主题
    Oracle PGA
  • 原文地址:https://www.cnblogs.com/sunzhiqi/p/10072678.html
Copyright © 2011-2022 走看看