select mperiod ,MKEY1,MKEY2,' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',SUM(MD3),0,SUM(MD3),0 
from EX_DATA2_YYYY 
where MKEY1 = 'IDN' AND MPERIOD BETWEEN '1999' AND '2007'
group by mperiod ,MKEY1 ,MKEY2
