1
我有以下2个SQL语句:组合两个复杂的SQL语句到一个
Select count(project.id) as '# Projects', c2.name as ' Country name' from project, country c2, project_country where project_country.project_id = project.id and project_country.country_id= c2.id group by c2.name;
select count(user.id) as '# Consultants',c1.name as ' Country name' from user,consultant_profile, country c1 where c1.id= user.country_id and user.is_active=1 and user.type=0 and user.id = consultant_profile.user_id group by country.name ;
是否有可能基于该country.id
场合并这两个查询,所以我只有一个结果与#Projects,#Consultants和国名?
谢谢@Mureinik,正是我需要的。 –