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
Name at least 5 different types of transformations used in mapping design and state the use of each.?
What is a stored procedure transformation?
What is joiner change?
How to extract sap data using informatica? What is abap? What are idocs?
What all are steps in up gradation of Informatica server?
Write the unconnected lookup syntax and how to return more than one column.
What are the tuning techniques you applied during your last project
How can informatica be used for an organization?
How to join three sources using joiner? Explain though mapping flow.
Reusable transformation and shortcut differences
What is informatica powercenter repository?
How do you remove duplicate records in informatica? And how many ways are there to do it?
can any one give some examples for pre sql and post sql(Except dropping and creating index).
Name the different lookup cache(s)?
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)