Query question

A

aspdb1028

To all,

I have a table like ->

Date Sym Qty Action Amount
1/1/09 GM 20 buy 40
1/1/09 GM 30 buy 60
1/1/09 GM 50 buy 100
1/2/09 GM 40 sell 120
1/2/09 GM 60 sell 180

Is there a way to query with result -

1/1/09 GM 100 buy 200
1/2/09 GM 100 sell 300

Thanks,

Frank
 
K

KC-Mass

Hi,

Try something like :

SELECT Date, Sym, Action, Sum (QTY) as SumOfQty, Sum (Amount) as SumOfAmount
FROM tblMyTableName
GROUP by Date, Sym, Action

Regards

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top