This is a discussion on Grouping and summering within the MySQL General forum forums, part of the MySQL category; --> Hi, I'm not that used to MySQL, yet. I wonder if it's possible to do the following grouping with ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I'm not that used to MySQL, yet. I wonder if it's possible to do the following grouping with summery on a record set? Tha records set looks as follows: - type - topic - description - time Example of data: Admin Email Email to customer A 0,25 Admin Email Email to customer B 0,25 Dev DB Customer A DB 1,25 Dev DB Customer B DB 0,75 Dev DB Customer A DB 0,50 Admin Email Email to customer B 0,25 I've done the following: SELECT type, topic, description FROM stamps GROUP BY type, topic This gives me: Admin Email Email to customer A 0,25 Admin Email Email to customer B 0,25 Dev DB Customer A DB 1,25 Dev DB Customer B DB 0,75 How I want it to look like is as follows: Admin Email Email to customer A 0,25 Admin Email Email to customer B 0,50 Email to customer B Dev DB Customer A DB 1,75 Customer A DB Dev DB Customer B DB 0,75 Is this possible in any way? Would be very pleased for a bit of help. Thanks in advance // Jonas |