select name, uw.count as weiblich,um.count as maenlich from (select political, count(*) from user_data where sex=1 group by political) as uw, (select political, count(*) from user_data where sex=2 group by political) as um, political p where uw.political=p.id and um.political=p.id;