Hey Vasile:
Cause I have more clauses based on the stock table that I haven't
included in the original query. For example:
SELECT
date, count(items)
FROM
(
SELECT
logs.date, logs.items
FROM logs
WHERE
extract(year from logs.date) = 2010)
GROUP BY date, items
) AS foo, stock
WHERE
stock.items = foo.items AND
stock.type = 'Books' AND ...
GROUP by date
cheers,
On Sat, Jan 29, 2011 at 1:27 PM, Vasile Ermicioi <[email protected]> wrote:
> why do you need 'stock' table ?
>>> WHERE
>>> stock.items = foo.items