SELECT sell_orders.sell_order_id, sell_order_items.card_id
FROM sell_orders
JOIN sell_order_items
ON sell_orders.sell_order_id = sell_order_items.sell_order_id
WHERE price <= desired_price
AND sell_order_items.card_id NOT IN (
    SELECT card_id
    FROM transactions
    WHERE sell_order_id == sell_order_id;
)
ORDER BY price ASC;
