select t.apanagecode 
       count(t.labcode) as 
       (select sum(f.hivfastsum)
          from aids_lab_labtesting f
         where f.labcode = t.labcode)
  from aids_lab_labinfomanger t
 where regexp_like(t.detect, '1[^0-9]')
 group by t.apanagecode,t.labcode
结果集是
1 15000000 1 250
2 15000000 1
我想算出这样
1        15000000 2        250