I have a simple model in Yii 1.1:
Expense
amount: int
date: string
How do I compute an aggregate by date using build-in Yii capabilities?
In other words I would like to get a result of the following query using Yii:
SELECT
date, SUM(amount) AS dateAmount
FROM
tbl_expense
GROUP BY
date
ORDER BY
date DESC