Filter results based on data from another table
Start with that: 

select * from products where price &gt; 100 and price &lt; 150; 


Then... 

select * from products p
left join discounted_products dp on dp.product_id = p.id
left join discounts d on dp.discount_id = d.discount_id 
 where (price+IFNULL(d.amount,0)) &gt; 100 and (price+IFNULL(d.amount,0)) &lt; 150;


I do not have any idea about the column names you are using, so... 

Is that what you want?