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...

Display the total debit counts, total credit counts, sum of
total debits, sum of total credits from an employee's
transaction table (a single table) containing the following
columns.
Transaction_number
Transaction_amount
Transaction_date
Transaction_type --> tells if the amount is a credit or a
debit.

As the query alone is important, the table is left with
specifying just the field's name. Pls help me with this
query.

Answer Posted / ajit

Also u can use count function to calculate total debit & credit cout.
and u can use this sql stmt

select tran_type, Count(tran_type) total,
(select sum(tran_amt)
from tran
where tran_type = 'D') sumofde,
(select sum(tran_amt)
from tran
where tran_type = 'C') sumofce
from tran
group by tran_type;

Is This Answer Correct ?    0 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to display the records between two range in Oracle SQL Plus?

1132


Is trigger a stored procedure?

921


What is transaction control language (tcl)?

1115


What is pl/sql table? Why it is used?

1023


Are subqueries faster than joins?

992


GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error?

3036


what is an alias command? : Sql dba

1073


what is sp_pkeys? : Transact sql

1138


What are the packages in pl sql?

998


What is a left join?

935


Is id a reserved word in sql?

1133


Why do we use procedures in sql?

1058


What is query syntax?

953


What is out parameter used for eventhough return statement can also be used in pl/sql?

1058


how to get help information from the server? : Sql dba

915