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 ? | 2 Yes | 2 No |
Post New Answer View All Answers
What is rank transformation?
Could you explain what is enterprise data warehouse?
What is the use of target designer?
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.
What is a repository manager?
What are the new features of informatica 9.x in developer level?
Debugger what are the modules, what are the options you can specify when using debugger, can you change the expression condition dynamically when the debugger is running.
What are the types of data warehouses?
generate date / time dimension in informatica
Describe an informatica powercenter?
What are the different types of repositories created using informatica?
What is mapping debugger?
What is meant by query override?
If the source has duplicate records as id and name columns, values: 1 a, 1 b, 1 c, 2 a, 2 b, the target should be loaded as 1 a+b+c or 1 a||b||c, what transformations should be used for this?
Why update strategy and union transformations are active?