I'm trying to make a report of financial datas for my company:
My table is ___BillableDatas
and looks like this:
|--------|------------|----------|----------|--------------|
| BIL_Id | BIL_Date | BIL_Type | BIL_Rate | BIL_Quantity |
|--------|------------|----------|----------|--------------|
| 1 | 2017-01-01 | Night | 95 | 1 |
| 2 | 2017-01-02 | Night | 95 | 1 |
| 3 | 2017-01-15 | Night | 105 | 1 |
| 4 | 2017-01-15 | Item | 8 | 2 |
| 5 | 2017-02-14 | Night | 95 | 1 |
| 6 | 2017-02-15 | Night | 95 | 1 |
| 7 | 2017-02-16 | Night | 95 | 1 |
| 8 | 2017-03-20 | Night | 89 | 1 |
| 9 | 2017-03-21 | Night | 89 | 1 |
| 10 | 2017-03-21 | Item | 8 | 3 |
|--------|------------|----------|----------|--------------|
What I would like to get:
Month 01 (January) =
311.00$
(95+95+105+8+8)Month 02 (February) =
295.00$
(95+95+95)Month 03 (March) =
202.00$
(89+89+8+8+8)Month 04 (April) =
0.00$
Month 05 (May) =
0.00$
...
Is it possible to make that with mySQL?
Do I nee to make several queries or I can make it in one ?
Thanks for any help.