sql统计字段

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/sinat_20174131/article/details/79975505
SELECT activity_id, count(*) FROM activity_prize_lottery_record GROUP BY activity_id HAVING count(*) > 0
output:
+--------------+----------+--+
| activity_id  |   _c1    |
+--------------+----------+--+
| 6            | 5648     |
| 9            | 3607     |
| 1            | 1388     |
| 4            | 7292     |
| 7            | 5439     |
| 5            | 2595     |
+--------------+----------+--+
阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页