Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



write sql query following table amount year quarter 1000 2003 first 2000 2003 ..

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

Post New Answer

More Informatica Interview Questions

What is the difference between bitmap and btree index?

2 Answers   CTS, TCS,


Dependecy Errors in Informatica ? Do u got any dependency problems while running session? Can any one Explain Clearly.

2 Answers   CTS,


What is power center repository?

1 Answers  


What is Cognos script editor?

0 Answers   Cognizant,


If we are using an aggregator but forget to mention the group by port .what will be the output??

11 Answers   Nomura, TCS,


How the informatica server increases the session performance through partitioning the source?

1 Answers  


how we load the data from source to staging area

4 Answers   TCS,


What is an aggregator transformation? it is active why cant it be passive explain?

3 Answers   HCL,


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

2 Answers   Wipro,


how we can do session partition in informatica any one explain me clearly? thanks advance.

1 Answers   iGate,


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.

0 Answers  


where to select code page option?

2 Answers   TCS,


Categories