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

In pmcmd command we need to type -p:password. Will it be visible to others who is having access to this file ?

4 Answers   Puma,


Hi All, I've 110 records in my table but 101 records contains an error. When I run the session, I want to load the 100 records into the target. Can anyone suggest me the best solution for this... Thanks in Advance,

7 Answers   Tech Mahindra,


Implementation methodology

0 Answers  


what is size of u r database?

0 Answers  


In Which scenario did u used Incremental loading?

2 Answers  






What are the issues that you have faced while moving your project from the Test Environment to the Production Environment?

1 Answers  


Where we use dynamic lookup and where we use it?do we generate surrogate keys using dynamic lookup?can we use it for scd type 2 mapping and why?

3 Answers   Amdocs,


comonly how meny mappings r there in Banking projects?

1 Answers  


What is the use of incremental aggregation?

2 Answers  


wf dont have integration severances how you can run?

0 Answers   TCS,


If a table contains 100 records we have to fetch 50-100 records from source to target?how

7 Answers   CSC,


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  


Categories