Topic: Why one Query works in mvd but not in SqliteStudio?
This query works in MVD.
@derek
select total(quantity) from transactions where transactions.id_products = products.id and quantity > 0
why no joins?
tables join auto in MVD so you guys write only some sql
if so
how I know which joins or pre provided query in MVD?
[17:25:06] Error while executing SQL query on database 'sqlite0': no such column: products.id
So I was learning sql - found join with group by
This works in SqliteStudio
SELECT products.id, products.name, SUM(transactions.quantity) AS total_quantity
FROM transactions
JOIN products ON transactions.id_products = products.id
WHERE transactions.quantity > 0
GROUP BY products.id, products.name;
Explain why?