MySQL 查詢相同記錄以及總數

來源:互聯網
上載者:User

select pageNum,count(pageNum) from page group by pageNum having count(pageNum) > 1 limit 0,50;

+---------+----------------+
| pageNum | count(pageNum) |
+---------+----------------+
|   60128 |              2 |
|   60129 |              2 |
|   60130 |              2 |
|   60131 |              2 |
|   60132 |              2 |
|   60133 |              2 |
|   60134 |              2 |
|   60135 |              2 |
|   60136 |              2 |
|   60137 |              2 |
|   60138 |              2 |
|   60139 |              2 |
|   60140 |              2 |
|   60141 |              2 |
|   60142 |              2 |
|   60143 |              2 |
|   60144 |              2 |
|   60145 |              2 |
|   60146 |              2 |
|   60147 |              2 |
|   60148 |              2 |
|   60149 |              2 |
|   60150 |              2 |
|   60151 |              2 |
|   60152 |              2 |
|   60153 |              2 |
|   60154 |              2 |
|   60155 |              2 |
|   60156 |              2 |
|   60157 |              2 |
|   60158 |              2 |
|   60159 |              2 |
|   60160 |              2 |
|   60161 |              2 |
|   60162 |              2 |
|   60163 |              2 |
|   60164 |              2 |
|   60165 |              2 |
|   60166 |              2 |
|   60167 |              2 |
|   60168 |              2 |
|   60169 |              2 |
|   60170 |              2 |
|   60171 |              2 |
|   60172 |              2 |
|   60173 |              2 |
|   60174 |              2 |
|   60175 |              2 |
|   60176 |              2 |
|   60177 |              2 |
+---------+----------------+

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.