sql - same type of value in a single row using case or decode -
dear friend have written following query, , got result in image.
select (case when croptype_code < 13 'pedi' else 'paudha' end) pl_rpflag, nvl(sum(gh_area),0) area w_cane_survey_2013 unit_code = '03' , gh_vill = '9991' , gh_grow= '1' group croptype_code; 
row1 , row3 both has paudha area displayed separately. want such values should add. means values of paudha should in single row , pedi values in single row.
select m.pl_rpflag, sum(m.area) ( select (case when croptype_code < 13 'pedi' else 'paudha' end) pl_rpflag, nvl(sum(gh_area),0) area w_cane_survey_2013 unit_code = '03' , gh_vill = '9991' , gh_grow= '1' ) m group m.pl_rpflag
Comments
Post a Comment