Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why is sorter an active transformation?

1101


Briefly describe lookup transformation?

1031


What are the features of complex mapping?

1146


Difference between Data and Index Caches?

1126


How do we call shell scripts from informatica?

1084


What are the components of the workflow manager?

1117


What are the different lookup cache(s)?

1098


How to extract sap data using informatica?

1027


What is complex mapping?

1106


How to call shell scripts from informatica?

986


How to differentiate between the active and passive transformations?

1139


Implementation methodology

1695


what are the different types of transformation available in informatica. And what are the mostly used ones among them?

1025


Explain dynamic target flat file name generation in informatica

1036


what is INFORMATICA TESTING process

2277