Výsledek, který popisujete, bude vypadat takto:
userid | id | subtotal | credit | tax | status | desc | amount
______________________________________________________________
1 | 1 | 20 | 0 | .7 | 1 | item1| 10
1 | 1 | 20 | 0 | .7 | 1 | item2| 10
1 | 2 | 30 | 0 | 2.1 | 1 | item3| 15
1 | 2 | 30 | 0 | 2.1 | 1 | item3| 15
1 | 3 | 10 | 0 | .7 | 0 | item1| 10
1 | 4 | 1 | 0 | .07 | 0 | item4| 1
Je to to, co hledáte?