摘要: #include #include #include #include #include #include #include using namespace std; const int maxn = 1000000 + 10; const int INF = 10000000; int n; bool used[maxn]; vector G[maxn]; vector E[m... 阅读全文
posted @ 2017-03-20 23:02 douzujun 阅读(276) 评论(0) 推荐(0) 编辑
摘要: (十二)分组查询 将数据表中的数据按某种条件分成组,按组显示统计信息 查询各班学生的最大年龄、最小年龄、平均年龄和人数 分组 SELECT <字段名表1> FROM <表名> -- 这里字段名表1 应该 是 按照字段名表2 分组以后 能够产生唯一值的 字段(如:班级) [WHERE <条件> ] G 阅读全文
posted @ 2017-03-20 17:41 douzujun 阅读(2757) 评论(0) 推荐(0) 编辑
摘要: (十一)函数查询 1. 聚合函数 对一组值进行计算,得到一个返回值 对一组值进行计算,得到一个返回值 SUM(), 求和 AVG(), 求平均 MIN(), 求最小 MAX(), 求最大 COUNT(), 计数,即个数 SUM(), 求和 AVG(), 求平均 MIN(), 求最小 MAX(), 求 阅读全文
posted @ 2017-03-20 15:53 douzujun 阅读(620) 评论(0) 推荐(0) 编辑