I still do not fully understand so I am making some assumptions.
Moreover you use field names either plural (and to me make more sense
singular) or not allowed (date). So...
db.define_table('item',Field('name',format='%(name)s')
db.define_table('stock',Field('item',db.item),Field('type'))
db.defin
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,
why do you need 'stock' table ?
>> WHERE
>> stock.items = foo.items
Hey Massimo:
Let me try to explain it:
End goal:
Display the total amount of non-duplicated items inserted every date.
I have the logs table that has many items that are inserted at a given
date (item a, b, c, d, etc) . The problem is that the same item might
get inserted several times at the sa
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)" wrote:
> Hey guys:
>
> Is there a way to do this query in DAL?
>
> SELECT
> date, count(foo.items)
> FROM
> (
>
5 matches
Mail list logo