CREATE TABLE Projects (project_id VARCHAR2, project_details VARCHAR2)
CREATE TABLE Tasks (task_details VARCHAR2, task_id VARCHAR2, project_id VARCHAR2)
CREATE TABLE Project_outcomes (project_id VARCHAR2)

What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes?
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
SELECT "T1"."task_details", "T1"."task_id", "T2"."project_id" FROM "Tasks" "T1" JOIN "Projects" "T2" ON "T1"."project_id" = "T2"."project_id" AND "T2"."project_details" = 'omnis' UNION SELECT "T1"."task_details", "T1"."task_id", "T2"."project_id" FROM "Tasks" "T1" JOIN "Projects" "T2" ON "T1"."project_id" = "T2"."project_id" JOIN "Project_outcomes" "T3" ON "T2"."project_id" = "T3"."project_id" GROUP BY "T2"."project_id" HAVING COUNT(*) > 2