write sql query following table
city gender no
chennai male 40
chennai female 35
bangalore male 25
bangalore female 25
mumbai female 15
i want the required output
city male female
chennai 40 35
bangalore 25 25
mumbai 15
Answer Posted / chanakya
SELECT CITY,
SUM(DECODE(GENDER,'MALE',NO)) MALE ,
SUM(DECODE(GENDER,'FEMALE',NO)) FEMALE
FROM TABLE_NAME GROUP BY CITY
| Is This Answer Correct ? | 9 Yes | 5 No |
Post New Answer View All Answers
Why is sorter an active transformation?
Briefly describe lookup transformation?
What are the features of complex mapping?
Difference between Data and Index Caches?
How do we call shell scripts from informatica?
What are the components of the workflow manager?
What are the different lookup cache(s)?
How to extract sap data using informatica?
What is complex mapping?
How to call shell scripts from informatica?
How to differentiate between the active and passive transformations?
Implementation methodology
what are the different types of transformation available in informatica. And what are the mostly used ones among them?
Explain dynamic target flat file name generation in informatica
what is INFORMATICA TESTING process