Group By:
SELECT COUNT(`id`) AS `Records`, DATE(FROM_UNIXTIME(`date`)) AS `Date`
FROM `table`
GROUP BY DATE(FROM_UNIXTIME(`date`))
Output:
Records | Date
--------------------------------
10 | 2011-10-19
10 | 2011-10-18
Order By:
SELECT `id`, FROM_UNIXTIME(`date`) AS `Date`
FROM `table`
ORDER BY DATE(FROM_UNIXTIME(`date`)) [ASC|DESC]
(Though in actuality you would get the same ordering using only FROM_UNIXTIME() or the raw date
value since they would all stack properly in an ordering attempt)
Output:
id | Date
--------------------------------
03 | 2011-10-19 12:00:00
02 | 2011-10-18 12:00:00
01 | 2011-10-17 12:00:00
This converts the unix timestamp into a mysql datetime and then extracts the date value from that which is applied to the grouping or order clause
If you want to group by day regardless of month and year use DAY() instead of DATE()
However could you expand on the part about "group each row by day". what result do you want to show? when you group on something you use some sort of aggregate processor like COUNT() or SUM() on a field within the group.
MySQL Group Functions Reference
MySQL Date & Time Function Reference