wtite sql query following table are
city gender no
chennai male 40
chennai female 35
bangalore male 10
bangalore female 25
mumbai female 15
i want the output?
city male female
chennai 40 35
bangalore 10 25
mumbai null 15
Answer Posted / santosh kumar sarangi
select city,max(decode(gender,'male',no)) as male,
max(decode(gender,'female',no)) as female from table_name
group by city
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What will happen if the select list columns in the custom override sql query and the output ports order in sq transformation do not match?
What is the command used to run a batch?
Briefly explain the aggregator transformation?
Explain what are the different types of transformation available in informatica. And what are the mostly used ones among them?
what is granularity,what type of granularity we will take in fact tables either lowlevel or highlevel,if two tables having same granularity that is posiable or not
What is transformation?
What is complex mapping?
What is the main purpose of Unconnected lookup other than updating slowly changing dimensions? or In which case u use Unconnected lookup?
What are the databases that informatica can connect to windows?
What is the difference between informatics 7x and 8x and what is latest version?
What is the sequence generator transformation in informatica?
Explain the types of transformations?
Is stop and abort are same in informatica?
Why filter transformation is an active one?
What is confirmed fact in dataware housing?