SQL subselect filtering based on multiple sub-rows
问题 I have two tables, and want to extract certain columns from the first, based on 'child' data from the second. I'm using SQL Anywhere 12 Table 1) Lets call it Projects proj_id | Name --------+--------- 10 | Proj_1 20 | Proj_2 30 | Proj_3 40 | Proj_4 Table 2) Lets call this one tasks proj_id | task_id | Status --------+---------+----------- 10 | 1 | Ready 10 | 2 | Cancelled 10 | 3 | Ready 20 | 1 | Complete 20 | 2 | Ready 30 | 1 | Ready 30 | 2 | Not Ready 30 | 3 | Complete 40 | 1 | Ready 40 | 2