Since you don't issue a ticket when the balance is zero, why isn't it
sum(payments) - count(tickets)*price
? ? ? ?
(You do have an odd db design with both payments and ticket issues in the same table . . . . )
|
Results 1 to 10 of 11
Thread: add and subtract column in queryThreaded View
|
Click Here to Expand Forum to Full Width |