I'm trying to do a group by
. However, this unique id field prevents me to do it.
Can you please help me to resolve this issue.
thanks.
scenario 1
select box.name, box.description, box.id
from box
group by box.name, box.description, box.id
order by box.id
update: I've already solved the first scenario http://sqlfiddle.com/#!6/111e7/16/0
scenario 2
select box.name, box.description, box.id, sum(box.amount) as amount
from box
group by box.name, box.description, box.id
order by box.id
update: I've already solved the second scenario http://sqlfiddle.com/#!6/449b7/2