This commit is contained in:
parent
6ae15a8e64
commit
ed8cf628a5
|
@ -48,8 +48,7 @@ BEGIN
|
||||||
GROUP BY itemFk
|
GROUP BY itemFk
|
||||||
),
|
),
|
||||||
sold AS (
|
sold AS (
|
||||||
SELECT SUM(s.quantity) AS quantity,
|
SELECT SUM(s.quantity) AS quantity, s.itemFk
|
||||||
s.itemFk
|
|
||||||
FROM vn.sale s
|
FROM vn.sale s
|
||||||
JOIN vn.ticket t ON t.id = s.ticketFk
|
JOIN vn.ticket t ON t.id = s.ticketFk
|
||||||
LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id
|
LEFT JOIN vn.itemShelvingSale iss ON iss.saleFk = s.id
|
||||||
|
|
Loading…
Reference in New Issue