Scenario is like this:
Name Sal
A 10;
B 20;
C 30;

Then Output should be
Name Sal
A 10;
B 20;
C 30;
Total 60;

Use SQL For this scenario

Answer Posted / pooja

Select case when GROUPING(e.Name)= 1
then'Total'else e.Name end as Name,
sum(e.Salary)as Salary from Emp e
group by e.Name with rollup

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What the difference is between a database, a data warehouse and a data mart?

590


How identifying bottlenecks in various components of informatica and resolving them?

577


What is the function of look up transformation?

647


How does a rank transform differ from aggregator transform functions max and min?

667


Differentiate between a database and data warehouse?

650






where to store informatica rejected data?

674


suppose in my source flatfile i have 10000 records in that some of master table records missed table records missed then what will u do

1730


Why sorter is an active transformation?

746


What is status code in informatica?

582


What are the features of complex mapping?

639


While migrating the data from one environment to another environment how would you manage the connections?

623


What is meant by active and passive transformation?

582


Hi, I want to change date type char value integer value? I tried alter table tab_name modify (newcolumn newdatetype). But The columns have 10 million values(char type) so I want to load now numeric data. How it is possible? Old Values New Value(I want to load numeric data but the old value should be there in the column) Y 1 N 0 ERROR at line 1: ORA-01439: column to be modified must be empty to change datatype Please help on this. Thanks, GM

3441


What is informatica worklet?

608


How to generate sequence numbers without using the sequence generator transformation?

639