I have this table:

```
DebitDate | DebitTypeID | DebitPrice | DebitQuantity
----------------------------------------------------
40577       1             50           3
40577       1             100          1
40577       2             75           2
40578       1             50           2
40578       2             150          2

```

I would like to get with a single query (if that's possible), these details:
date, debit\_id, total\_sum\_of\_same\_debit, how\_many\_debits\_per\_day

so from the example above i would get:

```
40577, 1, (50*3)+(100*1), 2 (because 40577 has 1 and 2 so total of 2 debits per this day)
40577, 2, (75*2), 2 (because 40577 has 1 and 2 so total of 2 debits per this day)
40578, 1, (50*2), 2 (because 40578 has 1 and 2 so total of 2 debits per this day)
40578, 2, (150*2), 2 (because 40578 has 1 and 2 so total of 2 debits per this day)

```

So i have this sql query:

```
SELECT      DebitDate, DebitTypeID, SUM(DebitPrice*DebitQuantity) AS TotalSum
FROM        DebitsList
GROUP BY    DebitDate, DebitTypeID, DebitPrice, DebitQuantity

```

And now i'm having trouble and i'm not sure where to put the count for the last info i need.