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 the difference between bitmap and btree index?
Dependecy Errors in Informatica ? Do u got any dependency problems while running session? Can any one Explain Clearly.
What is power center repository?
What is Cognos script editor?
If we are using an aggregator but forget to mention the group by port .what will be the output??
How the informatica server increases the session performance through partitioning the source?
how we load the data from source to staging area
What is an aggregator transformation? it is active why cant it be passive explain?
In mapping f.f as one src and f.f as trg,f.f as src and oracle as trg which is fast? mean which is complete first process
how we can do session partition in informatica any one explain me clearly? thanks advance.
I have two different source structure tables, but I want to load into single target table? How do I go about it? Explain in detail through mapping flow.
where to select code page option?