> I have a table (postgres), with a date field (yyyy-mm-dd). How do I group by > year? > > 'select sum(profit) from loan group by apply_date' would group by the DAY, > not year.
SELECT SUM(profit) FROM load GROUP BY YEAR(apply_date) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php