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表格里平均年龄,显示浮点数               
  • 相关阅读:
    高精度模板_C++
    NOIP总结
    HDU2063_过山车_C++
    手写堆_C++
    NOIP2013Day1解题报告
    [ CodeVS冲杯之路 ] P1368
    POJ1002_487-3279_C++
    [ CodeVS冲杯之路 ] P1092
    POJ2376_Cleaning Shifts_C++
    欧几里得距离_曼哈顿距离_切比雪夫距离
  • 原文地址:https://www.cnblogs.com/sunzhiqi/p/10072678.html
Copyright © 2011-2022 走看看