Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我在表格中有一个列,我想从选定的列中选择最常见的项目。表设置发布:
我希望能够选择出版物发表次数最多的地方。这可能吗? 在此先感谢 院长
select published, count(*) nbr from table1 group by published order by nbr desc limit 1
您实际上并不需要计数,但如果您想确认选择似乎合理,您可以使用它。此外,您没有具体说明您是否只想要一个,或者想看看哪个是最频繁的,以及其他记录的频率。limit 1如果您想查看所有记录,请关闭。
limit 1