BiggerBrother
Technical User
I have 2 tables, one for transactions and the other for departments.
Transactions:
trans_id
trans_amount
trans_date
trans_dept
Department:
dep_id
dep_name
I need to return a recordset with 4 fields, which are:
dep_id
dep_name
sum(transactions for this dep)
sum(transactions for this dep WHERE trans_date is not null)
I'm not sure how to achieve the two sum columns, whether I can use the sum() function, or it has to be a join?
Any help would be great.
Many thanks
BB
Transactions:
trans_id
trans_amount
trans_date
trans_dept
Department:
dep_id
dep_name
I need to return a recordset with 4 fields, which are:
dep_id
dep_name
sum(transactions for this dep)
sum(transactions for this dep WHERE trans_date is not null)
I'm not sure how to achieve the two sum columns, whether I can use the sum() function, or it has to be a join?
Any help would be great.
Many thanks
BB