jon/py/jon/db/get_items_by_barcode.sql

7 lines
152 B
SQL

SELECT
*
FROM all_inventory_item_overview
WHERE item_barcode = %(item_barcode)s
AND location = %(location_id)s
ORDER BY available DESC, bought DESC