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
What is workflow? What are the components of the workflow manager?
Can some one explain me about Telecommunications(wireless) project in Informatica? Thanks in advance
What are the static cache and dynamic cache in informatica?
What does refresh system mean, and what are its distinctive choice?
How do you load first and last records into target table?
What is the difference between power center and power mart? What is the procedure for creating independent data marts from informatica 7.1?
COL1,COL2 ABC,1 XYZ,2 HERE IN COL2 VALUES 1,2 NOT STSANDARD(IE MEANS NOT FIXED VALUES LIKE OTHER SOME VALUES LIKE 10,20) O/P IS COL1,COL2 ABC,2 XYZ,1
What is a pre-defined event and user-defined event?
If informatica has its scheduler why using third party scheduler?
What is Cognos script editor?
in u flatfile some of fact records are missed then u load the diminision records are not if u load diminsion records what about fact table records
Is it possible to use a client with different version than that of its Informatica server?
What is the Rank index port in Rank transformation?
Briefly define a session task?
what is the difference between informatica6.1 and infomatica7.1