1. 程式人生 > >資料庫查詢語句,oracle查詢一個表中欄位相同資訊的個數並按個數排序

資料庫查詢語句,oracle查詢一個表中欄位相同資訊的個數並按個數排序

表名:hotsearch    欄位:hotword

select distinct hotword, count(hotword) from hotsearch group by hotword order by count(hotword) desc;