Selecting the most common value from relation - SQL statement

后端 未结 3 1622
无人及你
无人及你 2020-12-30 08:24

I have a table within my database that has many records, some records share the same value for one of the columns. e.g.

|  id  |  name  |  software  |
______         


        
3条回答
  •  滥情空心
    2020-12-30 08:58

    select top 1 software 
    from your_table 
    group by software
    order by count(*) desc 
    

提交回复
热议问题