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
Answer / chanakya123
SELECT YEAR,
SUM(DECODE(QUARTER,'FIRST',AMOUNT)) Q1_AMOUNT ,
SUM(DECODE(QUARTER,'SECOND',AMOUNT)) Q2_AMOUNT,
SUM(DECODE(QUARTER,'THIRD',AMOUNT)) Q3_AMOUNT,
SUM(DECODE(QUARTER,'FOURTH',AMOUNT)) Q4_AMOUNT
FROM TABLE_NAME GROUP BY YEAR
| Is This Answer Correct ? | 9 Yes | 0 No |
what is upstream and downstream transformation?
i have a table with name field. i,e name Shankar prabhakar nitikripa so no if a occures 3 times in name then it will go to tgt A if b occures 3 times in name then it will go to tgt b .. if z occures 3 times in name then it will go to tgt z
when do we use static cache and when do we use dynamic cache in lookup transformation? with example.
Write the different tools in the workflow manager?
By seeing the parameter file how do u identify wheather it is a workflow parameter or mapping parameter?
What is a joiner transformation and why it is an active one?
HOW CAN U FIND THE SESSION START TIME? chandumba2005@gmai.com
how do u fnd the duplicate rows and how to delete the duplicate rows?
when i was running the seesion, after loading 100 records, session suddenly fails.Next time i want to load the remaing rows in target with out truncate target table.What should i use?
What is predefined event?
Hi ETL gurus can any one tell me with a flow how to implement SCD Type 1 and SCD Type 2 in a single mapping.For some fields SCD type has to be implemented and for some fields scd type has to be implementd..Thank in advance..please let me know in case of any concerns...
how can we update without using update transformation. wt is push down operation in informatica. which lookup gives more tuning performance. if so why.