In questo momento posso solo pensare a una versione subselect:
SELECT type, amount
FROM table AS t
WHERE dat = (
SELECT MAX(dat)
FROM table
WHERE type=t.type
AND dat <= '2011-03-01'
)
In questo momento posso solo pensare a una versione subselect:
SELECT type, amount
FROM table AS t
WHERE dat = (
SELECT MAX(dat)
FROM table
WHERE type=t.type
AND dat <= '2011-03-01'
)