You are going to get an ugly printout doing it that way. Since you don't know how many products have been purchased on any given day your second column may end up haveing thousands of items in it for 1 date and only 1 for the next date making your display lopsided.
But besides that here is the structure that you are going to need:
1 - Select from your tables ordering data by the date.
2 - Before entering the loop set your initial date to the date of the first record in your result set.
3 - Walk through each record in your result set checking the date against your stored date, if they are different do what needs to be done to print out your information and re-set your agregating variables. And re-set your stored date the the current records date (not the same).
4 - For each record add the product information to a string for display, and add the pricing information to a variable. Also add the pricing to a Total variable that won't get re-set in #3
5- After you have finished all of the records do #3 for the final stored information and then print out your Sum line.
Thats all there is to it.