On Sun, 13 Jul 2003 11:03:21 +0300, Veysel Harun Sahin wrote: >SELECT week, sum(tips) FROM mytable GROUP BY week;
Sorry, I wasn't clear. I have ONLY daily data, not weekly, but I want to output weekly data. These are the fields I have: date DATE NOT NULL, hours_worked DECIMAL(5,2), no_of_deliveries TINYINT(1) UNSIGNED, total_tips DECIMAL(5,2), gas_used TINYINT(1) UNSIGNED, notes TEXT There is no "week" field. So, I have to compute 'week" by adding together sum(tips) for 7 consecutive days. Any suggestions how I can extract many consecutive weekly sums? -- Trevor Smith | [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]