write sql query following table
city gender no
chennai male 40
chennai female 35
bangalore male 25
bangalore female 25
mumbai female 15
i want the required output
city male female
chennai 40 35
bangalore 25 25
mumbai 15
Answer Posted / chanakya
SELECT CITY,
SUM(DECODE(GENDER,'MALE',NO)) MALE ,
SUM(DECODE(GENDER,'FEMALE',NO)) FEMALE
FROM TABLE_NAME GROUP BY CITY
Is This Answer Correct ? | 9 Yes | 5 No |
Post New Answer View All Answers
Dimension Object created in Oracle can be imported in Designer Cubes contain measures
whats the logic to load the lower level of granularity of data to fact table.
I have two different source structure tables, but I want to load into single target table? How do I go about it? Explain in detail through mapping flow.
Suppose we configure sorter transformations in the master and detail pipelines with the following sorted ports in order: item_no, item_name, price. When we configure the join condition, what are the guidelines we need to follow to maintain the sort order?
As union transformation gives UNION ALL output, how you will get the UNION output?
how we can load rejected record's at run time?(not through bad files)
In what scenario we use to improve session performance by pushdown optimization?can any one give example?
What is expression transformation?
Enlist the differences between database and data warehouse.
Why union transformation is an active transformation?
what is the size of u r source(like file or table)?
Why do you use Mapping Parameter and mapping variable?
Explain the code page compatibility?
What is the function of look up transformation?
How to load a Dimension ? and how to load a fact table?