write a query to follwoing table
amount year quarter
254556 2003 first
546332 2003 second
129034 2003 third
490223 2003 fourth
165768 2004 first
265443 2004 second
510412 2004 third
435690 2004 fourth
i want the output
year q1_amount q2_amount q3_amount q4_amount
2003 254556 546332 129034 490223
2004 165768 265443 510412 435690
Answer Posted / praveen hattikal
Select YEAR,SUM(q1_amt)q1_amt,SUM(q2_amt)q2_amt,SUM(q3_amt)
q3_amt,SUM(q4_amt)q4_amt from (
select YEAR,
Decode (QUARTER,'first',amount,0) as q1_amt,
Decode (QUARTER,'second',amount,0) as q2_amt,
Decode (QUARTER,'third',amount,0) as q3_amt,
Decode (QUARTER,'fourt',amount,0) as q4_amt
from table_name) group by YEAR
Is This Answer Correct ? | 8 Yes | 0 No |
Post New Answer View All Answers
Separate from an archive server and a powerhouse?
How can you generate reports in informatica?
In What Situations we can use MappingParameters ,Mapping Variables AND Session Parameters in REAL TIME.
How to load a Dimension ? and how to load a fact table?
what is the -ve test case in your project.
where to store informatica rejected data?
What is a difference between complete, stop and abort?
Plz can any one say me how to get the informatica certification materials and dumps
Hi, I saw one mapping implemented by my seniors . In Expression transformation they implemented following logic. That is iif(is_date(in_UC_DATINV,'YYYYMMDD'),to_date(in_UC_DATINV,'Y YYYMMDD'),'Inventory Date is either invalid or null') Inventory_Date is validated only for is_date() But not validated for notisnull() . But error says “ either invalid or null “ why? Whether is_date() also check for not isnull() ? or in this logic something is different ? Please answer me . Advance thanks
What is data transformation manager process?
What is a grid in Informatica?
Can I use same Persistent cache(X.Dat) for 2 sessions running parallely? If it is not possible why?If yes How?
What is a mapplet/worklet in informatica?
What do you mean by filter transformation?
How can you define user defied event?