随笔分类 -  mysql

摘要:1.建表 CREATE TABLE `t_log_code_num` ( `id` int(11) NOT NULL AUTO_INCREMENT, `server_id` int(3) NOT NULL, `date` date NOT NULL, `code` varchar(20) NOT N 阅读全文
posted @ 2017-08-01 18:04 静静的天空很安静 阅读(174) 评论(0) 推荐(0)
摘要:select c.cn as '省',c.cn_city as '市', SUM(CASE t.placeId when 1 then t.num else 0 end ) as '餐饮' , SUM(CASE t.placeId when 2 then t.num else 0 end ) as  阅读全文
posted @ 2017-08-01 16:46 静静的天空很安静 阅读(1286) 评论(0) 推荐(0)