select distinct matyan1,matyan2,case when matyan3 = 0 then "3" else "N" as ma3,sum(matyan4) as matyan4,(select case when matyan5 > 0 then "plus" else "minus" as matyan5 from matyan),...,matyan100 from matyan inner join ・・・where ・・・
という1行で果てしなく書いてあるのもありまして、、、
萎えます;;;;
少なくとも下のように書いてくれたほうがマシな気はします。
select distinct matyan1, matyan2, case when matyan3 = 0 then "3" else "N" as ma3, sum(matyan4) as matyan4, (select case when matyan5 > 0 then "plus" else "minus" as matyan5 from matyan), ..., matyan100 from matyan inner join ・・・ where ・・・