Hi lets say I have a table like this:
________________________________________________________
|
| id | order | date | item | price|
-------------------------------------------------------
| 1 1st date i1 10,00|
|-------------------------------------------------------
| 2 2nd date u2 15,00|
|-------------------------------------------------------
| 3 1st date i1 20,00|
|-------------------------------------------------------
| 4 2nd date u2 30,00|
|-------------------------------------------------------
I need to get total sum of items containing same order name and print DISTINCT orders like:
order_name – date – total sum. or better way to create new tabel and store there total sum of each order and in this table add sum id in each row?
This will literally return
order_name - date - total sum, assuming yourdatecolumn isdateTo add a quantity, try this: