wikideck/db/getBuyOrders.sql
Eric Meehan 14def28b68 Initial commit
Created basic application design and data schemas.
2025-05-28 19:24:37 -04:00

13 lines
257 B
SQL

SELECT buy_order_id
FROM buy_orders
JOIN cards
ON buy_orders.title = cards.title
WHERE title == desired_title
AND price >= desired_price
AND volume > (
SELECT count(*)
FROM transactions
WHERE buy_order_id == buy_order_id;
)
ORDER BY price DESC;