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
Explain dynamic target flat file name generation in informatica
Enlist the differences between database and data warehouse.
What is the difference between informatics 7x and 8x and what is latest version?
what is index?how it can work in informatica
Tell me any other tools for scheduling purpose other than workflow manager pmcmd?
explain abt ur project architecture?
Under what condition selecting sorted input in aggregator may fail the session?
Write the program through which the records can be updated?
Can we use the mapping parameter or variables developed in one mapping into any other reusable transformation?
Explain about Informatica server process that how it works relates to mapping variables?
What will be the approach?
How to load last n records of file into target table - informatica
What is the use of source qualifier?
Explain the different kinds of facts.
Define sessions in informatica etl?