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

What is posting?

991


What is flag in sql?

984


Why truncate is faster than delete?

1055


Explain what is table in a database?

1009


what is a trigger? : Sql dba

976


What is compiled query?

956


What does the file extension accdb stand for?

919


what is single byte over head in oracle..?

2342


What is the maximum rows in csv?

860


How do I delete a trigger?

916


What is raid? How does it help storage of databases?

1035


how to use regular expression in pattern match conditions? : Sql dba

966


Can we delete column in sql?

1026


Do we need to create index on primary key?

858


What are the most important characteristics of pl/sql?

1080