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 / santosh kumar sarangi

select city,max(decode(gender,'male',no)) as male,
max(decode(gender,'female',no)) as female from table_name
group by city

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define the various join types of joiner transformation?

1039


what are the Methods For Creating Reusable Transformations?

1253


without table how to come first record only in oracle?

2301


What does role playing dimension mean?

1087


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

1097


Why do you use Mapping Parameter and mapping variable?

1806


Suppose we have a source qualifier transformation that populates two target tables. How do you ensure tgt2 is loaded after tgt1?

1138


Target increases every day even though no new record was inserted

1624


As union transformation gives UNION ALL output, how you will get the UNION output?

1158


Differentiate between reusable transformation and mapplet.

1141


source : xml file target: xml file how can we check data loaded into target xml file using writing sql query. pls help on this asap.

2778


Which means the first record should come as last record and last record should come as first record and load into the target file?

1141


permutations of mapplet

2548


write a query to retrieve the latest records from the table sorted by version(scd)

1110


What are the main features of Oracle 8i with context to datawarehouse?

2158