try:
  select sum(a.12)
    from a,b
   where a.11=b.11
     and a.14 = b.14
     and a.15 = b.15
  GROUP BY b.12
  union all
  select count(a.12)
    from a,b
   where a.11=b.11
     and a.14 = b.14
     and a.15 = b.15
  GROUP BY b.13
  order by a.20