I have two tables, A & B
Table A Table B
order id order id quantity
----------- ------------ -------------
1 1 10
2 2 20
3 3 10
4 4 5
5 5 6
table A contains the order id and table B contains order id & quantity. I am trying to run a MySQL query that shows rows with a total equal to or less than a number. For example, a query to find rows equal to or less than 15 will show the rows with order id's 4 & 5