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

Suppose we do not group by on any ports of the aggregator what will be the output?

0 Answers  


what is metadata?

6 Answers  


in my source table one of column contains the data like vishnraju@gmail.com,suresh@yahoo.com,krishna@hotmail.com these records i need to send in target table as below format. vishnuraju,suresh,krishna

5 Answers   Cap Gemini,


What is a filter transformation and why it is an active one?

0 Answers  


explain different levels in pushdown optimization with example?

2 Answers   TCS,






I have source data like this col1 col2 col3 5 3 8 6 2 9 7 1 10 and i want to get target as col1 col2 col3 5 1 8 6 2 9 7 3 10 which transformation i have to use and how?

3 Answers  


How to convert IBM Cognos generated XML to a readable XML format for ETL tools

1 Answers  


Input flatfile1 has 5 columns, faltfile2 has 3 columns(no common column) output should contain merged data(8 columns) Please let me know how to achieve ??

3 Answers   IBM,


I'd like the load to be triggered by client. By placement of a file or somehow. How is it done in Informatica? I'm using version 7.1.4 This is so urgent - I really appreciate your help :-)

3 Answers   Alcatel-Lucent, ECI Telecom,


My source is delimited flat file Flat file data is H|Date D1|ravi|bangalore D2|raju|pune T|4 The data will be send to target if the fallowing two conditions satisfied 1.The first row Date column is equal to SYSDATE 2.Last record second port equal to number of records. How to achieve?

2 Answers   Sapient,


tell me the rules and responsblites in our project(my project is development)

0 Answers  


can we override a native sql query within informatica? Where do we do it?

0 Answers  


Categories