How to write the query? table1: order (order can have more than 1 item) table2: item (has order_id). table3: item_status (has item_status_id and item_id) table4: status (has item_status_id). Status can be 'complete', 'pending'.
I need to get all orders that have ONLY completed items. Examples: if order has one item and it is completed, I need this order. If order has 2 items and both completed, I need this order. If order has 2 items, 1 is completed and 1 is not completed, I don't need this order. Thanks