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 happen when you enable grid option avilable at session level ? (Ans found: Scalabily . A single session Parallelization) But how can one session is sharable among different nodes at the same time while running ?
5. Consider the following products data which contain duplicate rows. A B C C B D B Q1. Design a mapping to load all unique products in one table and the duplicate rows in another table. The first table should contain the following output A D The second target should contain the following output B B B C C
Explain lookup transformation source types in informatica
Can we change Dynamic to Static or Persistent cache? If so what happens?
how to create user defined function (udf) in informatica
What are roles and groups and benefits of using them?
On which transformations you created partitions in your project?
What is joiner change?
Explain the features of connected and unconnected lookup.
Explain the scenario which compels informatica server to reject files?
What are the different types of olap? Give an example?
-Which expression we can not use in Maplets?, -Can we join(relate) two dimensions in a schema? -Why and where we use 'sorted input' option?
How to elaborate powercenter integration service?
What are the modules in Power Center
can we override a native sql query within informatica? Where do we do it?