Pastebin
Paste #2102: No description
< previous paste - next paste>
Pasted by tdn
SELECT
category,
SUM(amount)*-1 AS amount,
EXTRACT('year' FROM date_transfer) AS year,
EXTRACT('month' FROM date_transfer) AS month
FROM transaction
WHERE amount < 0
GROUP BY
EXTRACT('year' FROM date_transfer) AS year,
EXTRACT('month' FROM date_transfer) AS month
HAVING
year = 2010
AND month = 1
ORDER BY
year ASC,
month ASC,
category ASC;
New Paste
Go to most recent paste.