-3
아래의 샘플 데이터를 찾아주세요 및 시나리오 내 출력이 첨부 된 이미지표시 특정 값
Object Type Amount Certain_Amount
Book Long-Ruled 20 5
Book Short-Ruled 30 5
Book All Type 5 5
Pen Fountain 55 100
Pen All Type 100 100
I처럼되고 싶어
with data_1 as (
select 'Book' as object,'Long-Ruled' as Type,20 as Amount from dual
union
select 'Book' as object,'Short-Ruled' as Type,30 as Amount from dual
union
select 'Book' as object,'All Type' as Type,5 as Amount from dual
union
select 'Pen' as object,'Fountain' as Type,55 as Amount from dual
union
select 'Pen' as object,'All Type' as Type,100 as Amount from dual
)
"모든 유형"금액을 나타내는 새로운 컬럼 "특정 금액"을 추가하려고합니다.
나는 아래 쿼리를 시도했다. 위는 단일 쿼리 내가 대답
선택 객체 유형을 가지고 질문을 게시 한 후