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
Define the various join types of joiner transformation?
what are the Methods For Creating Reusable Transformations?
without table how to come first record only in oracle?
What does role playing dimension mean?
Explain what are the different types of transformation available in informatica. And what are the mostly used ones among them?
Why do you use Mapping Parameter and mapping variable?
Suppose we have a source qualifier transformation that populates two target tables. How do you ensure tgt2 is loaded after tgt1?
Target increases every day even though no new record was inserted
As union transformation gives UNION ALL output, how you will get the UNION output?
Differentiate between reusable transformation and mapplet.
source : xml file target: xml file how can we check data loaded into target xml file using writing sql query. pls help on this asap.
Which means the first record should come as last record and last record should come as first record and load into the target file?
permutations of mapplet
write a query to retrieve the latest records from the table sorted by version(scd)
What are the main features of Oracle 8i with context to datawarehouse?