select info_id,api_url,name from site where city<>-1 and (select type from site_cert where info_id=site_cert.id)>0 group by info_id order by (select score from site_cert where info_id=site_cert.id) desc;
数据中如果info_id相同,则api_url相同,但name不同,所以用distinct不好做,用group by info_id 则去掉了重复的api_url(主要是想取出api_url,据所以不用考虑name)