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

wtite sql query following table are
city gender no
chennai male 40
chennai female 35
bangalore male 10
bangalore female 25
mumbai female 15
i want the output?

city male female
chennai 40 35
bangalore 10 25
mumbai null 15

Answer Posted / gagan

Suppose first table as test created below...

create table test
(
city varchar2(50),
gender varchar2(50),
nmbr varchar2(50)
)

and keep all data in it as mentioned and then try to run
this query...


select a.city, a.nmbr as male, b.nmbr as female
from test a, test b
where a.gender = 'male' and b.gender = 'female' and b.city
= a.city

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name at least 5 different types of transformations used in mapping design and state the use of each.?

1160


What is a stored procedure transformation?

1056


What is joiner change?

1149


How to extract sap data using informatica? What is abap? What are idocs?

1183


What all are steps in up gradation of Informatica server?

1047


Write the unconnected lookup syntax and how to return more than one column.

1112


What are the tuning techniques you applied during your last project

2027


How can informatica be used for an organization?

1220


How to join three sources using joiner? Explain though mapping flow.

1148


Reusable transformation and shortcut differences

1842


What is informatica powercenter repository?

1204


How do you remove duplicate records in informatica? And how many ways are there to do it?

1168


can any one give some examples for pre sql and post sql(Except dropping and creating index).

4111


Name the different lookup cache(s)?

1236


I have a mapping loading 100 records and it failed on 20th record. how to recover it without changing anything.(in prod where we don't have any access).. (the session should should start from 21 record)

1628