fix(sql): joins - resolved the comments
This commit is contained in:
@@ -44,7 +44,7 @@ FROM
|
|||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
order_items oi ON o.id = oi.order_id
|
order_items oi ON o.id = oi.order_id
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
users u ON o.id = u.id
|
users u ON o.user_id = u.id
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
products p ON oi.product_id = p.id;
|
products p ON oi.product_id = p.id;
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ SELECT
|
|||||||
FROM
|
FROM
|
||||||
users u
|
users u
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
orders o ON u.id = o.id
|
orders o ON u.id = o.user_id
|
||||||
WHERE o.user_id IS NOT NULL
|
WHERE o.user_id IS NOT NULL
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user