I have a select query that returns some financial data. I am trying to add a summary row before the results of my select query.
For example, my select query contains the following: date, amount, type (credit/debit). I need to return count, total debit, total credit, as the header (first row), followed by the select query result.
5 | 1000 | 1500 6/1/17 | 500.00 | Credit 6/2/17 | 500.00 | Debit 6/4/17 | 500.00 | Debit 6/6/17 | 500.00 | Credit 6/11/17 | 500.00 | Credit
I am not sure how to go about this.