8032-devToTest_2440 #3009
|
@ -48,7 +48,7 @@ BEGIN
|
||||||
GROUP BY itemFk
|
GROUP BY itemFk
|
||||||
),
|
),
|
||||||
sold AS (
|
sold AS (
|
||||||
SELECT SUM(s.quantity) AS quantity, s.itemFk
|
SELECT SUM(s.quantity) quantity, 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