mysql> select * from table1;
+----------+------------+-----+---------------------+
| name_new | transactor | pid | order_date |
+----------+------------+-----+---------------------+
| 1hahha | 1xiaohong | | -- :: |
| 2hahha | 2xiaohong | | -- :: |
| 3hahha | 3xiaohong | | -- :: |
| 4hahha | 4xiaohong | | -- :: |
| 3hahha | bob | | -- :: |
| 3hahha | lee | | -- :: |
| 3hahha | lee | | -- :: |
| 3hahha | lee | | -- :: |
| 3hahha | bob | | -- :: |
| 3hahha | bob | | -- :: |
+----------+------------+-----+---------------------+
rows in set (0.00 sec) mysql> select transactor,count(*) as num from table1 where pid >= group by transactor with rollup;
+------------+-----+
| transactor | num |
+------------+-----+
| 4xiaohong | |
| bob | |
| lee | |
| NULL | |
+------------+-----+
rows in set (0.00 sec) mysql> select transactor,count(*) as num from table1 where pid >= group by transactor with rollup having num>=;
+------------+-----+
| transactor | num |
+------------+-----+
| bob | |
| lee | |
| NULL | |
+------------+-----+
rows in set (0.00 sec)

最新文章

  1. [转]Windows 8.1删除这台电脑中视频/文档/下载等六个文件夹的方法
  2. Liferay 6.2 改造系列之五:修改默认站点的页面内容
  3. RAC转换为RAC One Node
  4. 仿微信朋友圈图片查看-glide加载网络图片,photoview 实现缩放
  5. OpenGL的几何变换2之内观察立方体
  6. 判断是否含有中文,包含返回true,不包含返回false
  7. jQuery中的经典动画
  8. 基于canvas的二维码邀请函生成插件
  9. [Codeforces Round #516][Codeforces 1063C/1064E. Dwarves, Hats and Extrasensory Abilities]
  10. 页面通过Jquery取值然后传值到后台显示underfined是怎么回事?
  11. Tensorflow生成唐诗和歌词(下)
  12. cant found Microsoft.VSSDK.BuildTools.15.0.26201
  13. linux下gcc默认搜索的头文件及库文件路径
  14. java Concurrent包学习笔记(三):ReentrantLock
  15. [Spark Core] Spark 核心组件
  16. 【刷题】BZOJ 4059 [Cerc2012]Non-boring sequences
  17. vue refs v-for 使用注意
  18. Microsoft SQL SERVER 2008 R2 REPORT SERVICE 匿名登录
  19. 利用JDK动态代理机制实现简单拦截器
  20. Java的四种引用类型之弱引用

热门文章

  1. A Deep Dive Into Draggable and DragTarget in Flutter
  2. Position定位相关知识了解
  3. 英语secuerity证券
  4. Mybatis 中的转义字符及常用查询
  5. OpenGL ES教程系列(经典合集)
  6. 介绍一个免费的云开发工具:Cloud Shell
  7. Flask--登录验证(多个装饰器)
  8. Eclipse上Maven环境配置使用
  9. ondblclick和dblclick区别
  10. D. Nested Segments(树状数组、离散化)