![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql
江流川
这个作者很懒,什么都没留下…
展开
-
创建省市县地址sql语句
DROP TABLE IF EXISTS `provinces`;CREATE TABLE `provinces` ( `id` int(11) NOT NULL auto_increment, `provinceid` varchar(20) NOT NULL, `province` varchar(50) NOT NULL, PRIMARY KEY (`id`)原创 2017-12-11 16:15:06 · 720 阅读 · 0 评论 -
sql删除重复条目只保留一条
delete from table_name where we_id not in (select mid from (select min(we_id) as mid from table_name group by fail_reason HAVING count(*) > 1) k ) and fail_reason in (select fail_reaso原创 2017-12-20 14:02:41 · 4482 阅读 · 0 评论 -
sql语句:查询分组统计并计算每组数量
select phone,count(order_id) as c from table_recordgroup by phoneorder by c desc原创 2018-01-03 11:17:16 · 74986 阅读 · 2 评论