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
What is primary and backup node?
What is aggregate cache in aggregator transformation?
What is event and what are the tasks related to it?
What is different between the data warehouse and data mart?
In What Situations we can use MappingParameters ,Mapping Variables AND Session Parameters in REAL TIME.
Explain is there any way to read the ms excel datas directly into informatica? Like is there any possibilities to take excel file as target?
What is workflow? What are the components of the workflow manager?
Scheduling properties,whats the default (sequential)
How do you manage the Parameter files while migrating your data from one environment to another environment?
How do you remove duplicate records in informatica? And how many ways are there to do it?
Explain sessions?
What are the advantages of using informatica as an etl tool over teradata?
What are the features of complex mapping?
What is resilience time?
IN SCD1, insource we have 10 billion records and in the first day its uploaded successfully and in the second day its taking time to upload because some records it might get update or insert new records. As a developer what will be the better solution for this??