卖逼视频免费看片|狼人就干网中文字慕|成人av影院导航|人妻少妇精品无码专区二区妖婧|亚洲丝袜视频玖玖|一区二区免费中文|日本高清无码一区|国产91无码小说|国产黄片子视频91sese日韩|免费高清无码成人网站入口

mysql的七個(gè)聚合函數(shù) mysql怎么從集合中查詢數(shù)據(jù)?

mysql怎么從集合中查詢數(shù)據(jù)?1、選中需要測(cè)試的數(shù)據(jù)庫,并查看測(cè)試數(shù)據(jù)庫表;由于表t_people_info中的id是主鍵,求id的個(gè)數(shù)即是求數(shù)據(jù)庫表的總記錄數(shù),代碼如下:select count(

mysql怎么從集合中查詢數(shù)據(jù)?

1、選中需要測(cè)試的數(shù)據(jù)庫,并查看測(cè)試數(shù)據(jù)庫表;由于表t_people_info中的id是主鍵,求id的個(gè)數(shù)即是求數(shù)據(jù)庫表的總記錄數(shù),代碼如下:select count(id) from t_people_info

2、查看數(shù)據(jù)庫表t_people_info中年齡中最小值,需要用到集合函數(shù)min(),代碼如下:select min(p_age) from t_people_info

3、查看數(shù)據(jù)庫表t_people_info中年齡中最大值,需要用到集合函數(shù)max(),代碼如下:select max(p_age) from t_people_info

4、查看數(shù)據(jù)庫表t_people_info中年齡中平均值,需要用到集合函數(shù)avg(),代碼如下:select avg(p_age) from t_people_info

5、若想統(tǒng)計(jì)t_people_info中的年齡的總和,用到集合函數(shù)sum(),代碼如下:select sum(p_age) from t_people_info

6、統(tǒng)計(jì)數(shù)據(jù)庫表中記錄個(gè)數(shù),除了使用count(主鍵)外,可以使用count(1)、count(*)和count(0),代碼如下:select count(1) from t_people_infoselect count(*) from t_people_infoselect count(0) from t_people_info