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
Answers were Sorted based on User's Feedback
Answer / niru
select name,salary from emp
union
select "total",sum(sal) from emp
Is This Answer Correct ? | 11 Yes | 4 No |
Answer / kiran
SQL> select ename,sal from emp union select 'total:',sum(sal) from emp;
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / situ
first create a table emp4 using the above data then execute the below query to find that output
select case when grouping(name)=1 then 'Total'else name end as name,sum(sal) as sal from emp4 group by rollup(name);
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / 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 |
What is the difference between Bulk Load and Normal Load
Explain load alternative records / rows into multiple targets - informatica
What is the status code in stored procedure transformation?
what is sql override?what is the use of it?
What are the modules in Power Center
Consider two cases: (1) Power Center Server and Client on the same machine (2) Power Center Sever and Client on the different machines what is the basic difference in these two setups and which is recommended?
What are the new features of informatica 9.x at the developer level?
Could any one to tell How to use the Oracle Analytic functions in Informatica?
difference between informatica 8.1.1 and 8.6
Hi, source data is col1 values are 5,6,7 col2 are 3,2,1 col3 are 8,9,10 and i want to get target as col1 5,6,7 col2 1,2,3 col3 8,9,10 how to do this one?
Hi ETL gurus can any one tell me with a flow how to implement SCD Type 1 and SCD Type 2 in a single mapping.For some fields SCD type has to be implemented and for some fields scd type has to be implementd..Thank in advance..please let me know in case of any concerns...
what is mean by grouping of condition column in lookup transformation?