--许可证过期的 (有效期)
select shop_name ,shop_url,address,yxq from o2o_shop_info_app
where pt_name ='饿了么h5' and city1='北京市' and zt='1' and yxq < '2018-08-16'
--一证多用 (注册号)
select shop_name, shop_url, address,xkzh from o2o_shop_info_app where xkzh in (
select xkzh from (
select count(1),xkzh from o2o_shop_info_app where city1='北京市' and zt='1'
and pt_name='饿了么h5'
and xkzh is not null
group by xkzh having count(1)>1 ) t ) and city1='北京市' and zt='1'
and pt_name='饿了么h5' order by xkzh
--未公示许可证
select shop_url,is_lhfj,is_yyzz ,is_xkz from o2o_shop_info_app
where pt_name ='饿了么h5' and city1='北京市' and zt='1' and is_xkz='0'
select shop_name ,shop_url,address,yxq from o2o_shop_info_app
where pt_name ='饿了么h5' and city1='北京市' and zt='1' and yxq < '2018-08-16'
--一证多用 (注册号)
select shop_name, shop_url, address,xkzh from o2o_shop_info_app where xkzh in (
select xkzh from (
select count(1),xkzh from o2o_shop_info_app where city1='北京市' and zt='1'
and pt_name='饿了么h5'
and xkzh is not null
group by xkzh having count(1)>1 ) t ) and city1='北京市' and zt='1'
and pt_name='饿了么h5' order by xkzh
--未公示许可证
select shop_url,is_lhfj,is_yyzz ,is_xkz from o2o_shop_info_app
where pt_name ='饿了么h5' and city1='北京市' and zt='1' and is_xkz='0'