select 
a.question字段,
sum(case b.df3 when 'x' then 1 else 0 end) as 严重问题个数,
count(a.df1) as 纪录总和
from table2 a,table1 b
where a.df1=b.df1
group by a.question字段