SELECT brand, date, weight, datediff(day, '2001/01/01', date) AS daysSinceMillemium FROM test2 ORDER BY brand, date ASC