yes, sometimes you can place an order inside the quote and the spread will get tighter and besting your order. cxl replace your order and become best for N time limit
poor database design leads to messy queries. Short answer, you can't in regular sql but can by dynamically creating the sql given your constraints: inner join, not forcefully join all 3 tables