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
Explain pushdown optimization $pushdownconfig parameter - informatica
What is the need of etl tools?
While migrating the data from one environment to another environment how would you manage the connections?
What are the different types of olap? Give an example?
If the source has duplicate records as id and name columns, values: 1 a, 1 b, 1 c, 2 a, 2 b, the target should be loaded as 1 a+b+c or 1 a||b||c, what transformations should be used for this?
Please tell me which institute is the best to study Informatica and asp.net in chennai Also please send me the latest interview questions in asp.net,c# and sql server to my id ramtryin@gmail.com
What is Cognos script editor?
What is transformation?
How to extract the informatica rejected data?
What is a sequence generator transformation?
Differentiate between a database and data warehouse?
What is enterprise data warehousing?
How to extract sap data using informatica?
Please let me know how to make Data masking in informatica..
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?