write sql query following table
amount year quarter
1000 2003 first
2000 2003 second
3000 2003 third
4000 2003 fourth
5000 2004 first
6000 2004 second
7000 2004 third
8000 2004 fourth
i want the output
year q1_amount q2_amount q3_amount q4_amount
2003 1000 2000 3000 4000
2004 5000 6000 7000 8000
can anybady help me to achieve the aboue result by using informatica.
thanks in advance.
Answer Posted / qlikstar
Select year,
sum(case when quarter = 'first' then amount end) AS q1_amount,
sum(case when quarter = 'second' then amount end) AS q2_amount,
sum(case when quarter = 'third' then amount end) AS q3_amount,
sum(case when quarter = 'fourth' then amount end) AS q4_amount
from table
group by year order by year
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Suppose we have two source qualifier transformations sq1 and sq2 connected to target tables tgt1 and tgt2 respectively. How do you ensure tgt2 is loaded after tgt1?
What do you mean by DTM and Load manager and what is difference between load manager and load balancer?
Enlist the various types of transformations.
Design a mapping to get the pervious row salary for the current row. If there is no pervious row exists for the current row, then the pervious row salary should be displayed as null.
What is confirmed fact in dataware housing?
3.how will u get information about bugs how will u rectify the bugs in realtime whch tool we are using to rectify the bugs
How to create or import flat file definition in to the warehouse designer?
differences between service based and product based?
what is the size of u r source(like file or table)?
Hi, I am planning to take Infa Certification exam but am unable to find its dumps anywhere on web. If anybody has it, plz share them with me. jkinfo22@gmail.com Thanks in advance
What is DR strategy for Informatica project?
Tell me can we override a native sql query within informatica? Where do we do it? How do we do it?
What is the difference between STOP and ABORT options in Workflow Monitor?
Explain is there any way to read the ms excel datas directly into informatica? Like is there any possibilities to take excel file as target?
Differentiate between a database and data warehouse?