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
can any one give some examples for pre sql and post sql(Except dropping and creating index).
Mention few power centre client applications with their basic purpose?
Explain how many types of dimensions are available in informatica?
What is a code page?
Informatica settings are available in which file?
What is blocking transformation?
What is the reusable transformation?
How identifying bottlenecks in various components of informatica and resolving them?
What is the advantage of informatica?
Explain the different lookup methods used in informatica?
How do you load unique records into one target table and duplicate records into a different target table?
where to store informatica rejected data? How to extract the informatica rejected data?
is it possible to index the data in cache of lkp transformation ?
Explain pushdown optimization and types in informatica
How to go to the older version for a mapping?