wikideck/db-old/getBuyOrders.sql
Eric Meehan 741b1f5b2a Attempting server startup.
* Created basic client

* Many bug fixes
2025-05-31 18:14:33 -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;