본문 바로가기

ORACLE

[오라클]컬럼 지정조건 값 카운트

select name_code,
count(DECODE(survey_point, '5', '1' , ​'0'​))
From statistics
where
reg_date <= '2018-mm-dd'
and reg_date >= '2018-mm-dd'

group by (name_code)


or
case when A=x then y [else Z] END



'ORACLE' 카테고리의 다른 글