in account table
account type amount
ac1 credit 300
ac2 debit 5000
ac3 credit 3000
ac1 debit 4000
ac3 debit 2000
ac2 credit 4000
write a query how to get sum of credit & sum of debit
Answer Posted / sanjay
select type,sum(amount)from account table group by type
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is blob datatype?
Where are the settings stored for each instance in oracle?
What is oracle thin client?
How to define a variable to match a table column data type?
What is query image?
is there a tool to trace queries, like profiler for sql server?
How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?
What are the numeric comparison operations?
How to create a temporary table in oracle?
Explain do view contain data?
Is primary key indexed by default in oracle?
> CREATE OR REPLACE FUNCTION FACTORIAL_1(factstr varchar2 ) 2 RETURN NUMBER AS 3 new_str VARCHAR2(4000) := factstr||'*' ; 4 fact number := 1 ; 5 BEGIN 6 7 WHILE new_str IS NOT NULL 8 LOOP 9 fact := fact * TO_NUMBER(SUBSTR(new_str,1,INSTR(new_str,'*')-1)); 10 new_str := substr( new_str,INSTR(new_str,'*')+1); 11 END LOOP; 12 13 RETURN fact; 14 15 END; explanation Above program?
What is flashback in Oracle?
What is a cursor in oracle?
HI ALL, CAN ANYONE TELL ME THE DIFFERENCES BETWEEN SQL CLUSTURS,MSQL CLUSTERS,ORACLE CLUSTERS.......THANKS IN ADVANCE