table name :Tab
fields name
1.trx_no (pk)
2.trx_date
3.account code (7 char)
4.account type (1 char)
5.amt
Tab contains account code day wise debit and credit transaction , account type fiels can have 2 value D for debit and c for Credit .
write a query to display the account code wise total debit and credit bal for the month of april 2004.
write a query to display account code wise new amt credit for the april 2004
Answer Posted / ritika yadav
select account_code,account_type, sum (amt)
from tab
where to_char(trx_date,'DD-MM-YYYY') between '01-04-2014' and '30-04-2014'
group by account_code, account_type
order by account_code, account_type;
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is number function in sql?
What is trigger types in sql?
what is rollback? : Sql dba
what is heap table? : Sql dba
How to know the last executed procedure?
Is oracle and sql same?
what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba
what is single byte over head in oracle..?
Does truncate require commit?
Why do we use procedures in sql?
What is the usage of the distinct keyword?
Which join is like inner join?
What is a trigger in sql?
What is the usage of distinct keyword?
What is forward declaration in pl sql?