USE DCP;
DROP VIEW IF EXISTS `view_platfrom_count`;
CREATE ALGORITHM=UNDEFINED DEFINER=`dcp`@`%` SQL SECURITY DEFINER VIEW `view_platfrom_count` AS
select `t1`.`industry` AS `industry`,sum(`t1`.`num`) AS `num`,sum(`t1`.`unit`) AS `unit`,sum(`t1`.`person`) AS `person` from (select if((`dcp`.`base_member_info`.`industry_dict` = ''),'12',`dcp`.`base_member_info`.`industry_dict`) AS `industry`,count(0) AS `num`,sum((`dcp`.`base_member_info`.`member_identification` = 'P')) AS `person`,sum(((`dcp`.`base_member_info`.`member_identification` <> 'P') or isnull(`dcp`.`base_member_info`.`member_identification`))) AS `unit` from `dcp`.`base_member_info` group by `dcp`.`base_member_info`.`industry_dict`) `t1` group by `t1`.`industry`


-- 159，161 已执行
