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

Explain the different lookup methods used in informatica?

978


Explain Dataware house architecture .how data flow from intial to end?

2534


Differentiate between Load Manager and DTM?

2096


What is the meaning of up gradation of repository?

1901


How to partition the Session?

1048


How to differentiate between the active and passive transformations?

1081


I am new to informatica and learning it,can anybody please tell me how we receive source as flat file in informatica,from where we get this flat file?

1721


What is the benefit of partitioning a session?

1108


Explain pmcmd command usage in informatica

1070


What are the different transaction levels available in transaction control transformation?

1122


write sql query vertical to horiozontal following table id name 1 100 2 dinesh 3 india 1 101 2 suresh 3 india 1 103 2 prakesh 3 usa i want output like id name country 100 dinesh india 101 suresh india 103 prakesh usa

2511


Write the advantages of partitioning a session?

1212


what is index?how it can work in informatica

1984


tell me the rules and responsblites in our project(my project is development)

1878


is it possible to index the data in cache of lkp transformation ?

1964