Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

does sql support programming? : Sql dba

1050


How many tables can a sql database have?

978


How many clustered indexes can you have?

975


What is pl sql and why it is used for?

1113


Name some usages of database trigger?

1021


How to get help at the sql prompt?

1115


Why primary key is required?

1007


explain about mysql and its features. : Sql dba

1016


What are the advantages of sql? Explain

1107


What are the methods of filing?

935


how to include comments in sql statements? : Sql dba

958


What are all different types of collation sensitivity?

1035


How to write a query to show the details of a student from students table whose

1000


how are mysql timestamps seen to a user? : Sql dba

1139


What is null in pl/sql?

1071