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 / venky
select city,sum(c1) male,sum(c2) female from(select
city,decode(gender,'male',no,0)
c1,decode(gender,'female',no,0) c2 from tablename) tablename
group by city;
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
What are the components of the workflow manager?
tell me about your project functionality
What will be the approach?
How to do the error handling of if ur source is flatfiles?
What is informatica worklet?
Give one example for each of conditional aggregation, non-aggregate expression, and nested aggregation?
How to do unit testing in informatica?
Explain in detail about scd type 1 through mapping.
How to implement security measures using repository manager?
can u any challenge your project?
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 a repository manager?
Define sessions in informatica etl?
As union transformation gives UNION ALL output, how you will get the UNION output?
Tell me about your experience in informatica? what is best mark you can give yourself? How to answer this question?