write a sql query following source?
subject mark
maths 30
science 20
social 80

requird output
maths science social
30 20 80

Answers were Sorted based on User's Feedback



write a sql query following source? subject mark maths 30 science 20 social 80 requird..

Answer / srikanth

select (select marks from sub where subject='maths') maths,
(select marks from sub where subject='science') science,
(select marks from sub where subject='social') social from
sub group by 1;

Is This Answer Correct ?    15 Yes 0 No

write a sql query following source? subject mark maths 30 science 20 social 80 requird..

Answer / brij

select
decode(subject,'maths',mark) maths
,decode(subject,'science',mark) science
,decode(subject,'social',mark) social
from <<table>>

Is This Answer Correct ?    5 Yes 3 No

write a sql query following source? subject mark maths 30 science 20 social 80 requird..

Answer / keshava

We can use pivot finction on 11g instead of multiple
decodes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Informatica Interview Questions

write asql query to filter improper date format? date 20-apr 11-mar-2010 30-may-2010 feb-2009 i want the output date 11-mar-2010 30-may-2010

2 Answers   Accenture,


how to call lookup qualifer in unconnected look;up

1 Answers   BirlaSoft,


Describe data concatenation?

0 Answers  


What is target designer and target load order?

0 Answers  


How to load only the first and last record of a flat file into the target?

3 Answers   Mind Tree,






diffrence between command task and control task

1 Answers   iNautix,


How You Pull the records on daily basis into your ETL Server.

2 Answers   TCS,


Define filter transformation?

0 Answers  


What is depict expression change?

0 Answers  


How do we do the Fact Load What is the size of your Data warehouse? What is your Daily feed size and weekly feed size

1 Answers  


What is data merging, data cleansing and sampling?

6 Answers   Satyam,


What are the ETL tools available in DWH?

6 Answers   Mphasis,


Categories