Show me the task ids for projects detailed as 'omnis'.
select t1.task_id from tasks as t1 join projects as t2 on t1.project_id = t2.project_id where t2.project_details = 'omnis';
How about the project id for projects which are detailed as 'omnis' or  have more than 2 outcomes?
select t2.project_id from tasks as t1 join projects as t2 on t1.project_id = t2.project_id where t2.project_details = 'omnis' union select t1.task_details, t1.task_id, t2.project_id from tasks as t1 join projects as t2 on t1.project_id = t2.project_id join project_outcomes as t3 on t2.project_id = t3.project_id group by t2.project_id having count(*) > 2
List the corresponding task details and task id as well.
select t1.task_details, t1.task_id, t2.project_id from tasks as t1 join projects as t2 on t1.project_id = t2.project_id where t2.project_details = 'omnis' union select t1.task_details, t1.task_id, t2.project_id from tasks as t1 join projects as t2 on t1.project_id = t2.project_id join project_outcomes as t3 on t2.project_id = t3.project_id group by t2.project_id having count(*) > 2