Before we try write is? Can you explain it? There is a condition on
stcok that seems a inner join but nothing is selected from the stock
table.





On Jan 28, 2:16 pm, "beto (R3)" <bet...@gmail.com> wrote:
> Hey guys:
>
> Is there a way to do this query in DAL?
>
> SELECT
>     date, count(foo.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
> GROUP by date
>
> Any help would be appreciated.
>
> thanks!

Reply via email to