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 / 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


Please Help Members By Posting Answers For Below Questions

Explain your project of banking domian.

1626


What are different types of transformations available in informatica?

962


Differences between connected and unconnected lookup?

1176


What are the types of data warehouses?

1463


Under which circumstances, informatica server creates reject files?

1049


I am not able to connect to the domain with the client although all services and databases are up and there is no network issue?

1035


Is it possible to define a single node as a Gateway node as well as worker node?

1087


Briefly explain your complete project(sales) flow, (ie. from source received from client, transformations, then despatch to end user) what are all the process. Kindly give step by step process.

2249


What are the various types of transformation?

1136


What is informatica worklet?

1010


Hi Everybody, I have one fixed width file as source and 4 oracle tables (relational) as target. What are the Unit test cases i need to implement ? 1.Using TextPad software i tested postion of the field 2.As per specification i tested like whether it is correctly mapped or not? Is there any other test case do i need to implement. If possible can any one give me the test cases Advance Thanks

1920


What is a connected transformation?

1077


What are the popular informatica products?

983


Explain sessions. Explain how batches are used to combine executions?

987


What is Story point Estimation ? Can any one give just an introduction about this ? Advance Thanks

5605