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
How can we improve session performance in aggregator transformation?
What is a repository manager?
What could be the possible resons of locks by user?
How will the document be delivered to me?
Give one example for each of conditional aggregation, non-aggregate expression, and nested aggregation?
Give some information on report bursting and how to do it in bca as I have to split the report and send different reports to different people?
How to elaborate tracing level?
How to create or implement slowly changing dimension (SCD) Type 2 Effective Date mapping in informatica/Flagging mapping in informatica/visioning mapping in informatica?
Why filter transformation is an active one?
What is a sequence generator transformation?
Where are the source flat files kept before running the session?
Difference between Target-based loading and constraint-based loading?
Can some one explain me about Telecommunications(wireless) project in Informatica? Thanks in advance
Describe expression transformation?
Dimension Object created in Oracle can be imported in Designer Cubes contain measures