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
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.
How can we create index after completion of load process?
Parameter and variable differences
How to generate or load values in to the target table based on a column value using informatica etl tool.
can any one give some examples for pre sql and post sql(Except dropping and creating index).
Hi Everybody, I have one fixed width file as source and 4 oracle tables (relational) as target. What are the Unit test cases i need to implement ? 1.Using TextPad software i tested postion of the field 2.As per specification i tested like whether it is correctly mapped or not? Is there any other test case do i need to implement. If possible can any one give me the test cases Advance Thanks
What are the transformations that are not supported in mapplet?
Explain the etl program with few examples.
Which files are created during the session rums by informatics server?
What is lookup change?
Explain the difference between a data warehouse and a data mart?
Differentiate between sessions and batches?
can u any challenge your project?
How to use procedural logic inside infromatica?
What is a router transformation?