I have a list of orders with suboperations. How can I create a list of finished orders? Finished order must have finished all suboperations.
Table "orders":
order_no | suboperation | finished
1 | preparing | 01/01/2009
1 | scrubbing | 01/05/2009
1 | painting | 01/10/2009
2 | preparing | 02/05/09
2 | painting | NULL
3 | preparing | 03/01/2009
3 | scrubbing | 03/15/2009
3 | painting | 03/10/2009
4 | bending | NULL
4 | crashing | NULL
4 | staining | NULL
4 | painting | NULL
Desired output (finished orders):
order_no
1
3