Mysql – How to exclude row of Table1 if it appears in joined Table2?
I have two tables joined orders (id) and order_status (id, order_id, status_id). I want to return only the orders that doesn't have a given status_id, I've tried: SELECT order_id FROM orders INNER JOIN order_status ON orders.id = order_status.order_id WHERE order_status.status_id…