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 substr in informatica?
How we can create indexes after completing the loan process?
What is aggregate cache in aggregator transformation?
Hi friends I want to know about what r the dimensions in the banking porjects and genarally how many tables r in project ?
How do you promote a non-reusable transformation to reusable transformation?
How will the document be delivered to me?
Define Pmrep command?
Could you explain what is enterprise data warehouse?
What is rank transform?
How to go to the older version for a mapping?
What is a shortcut and copy in Informatica and how two are different with each other?
What do you mean by enterprise data warehousing?
Which is the t/r that builts only single cache memory?
Is there any way to read the ms excel datas directly into informatica?
What is joiner change?