I just got put onto a project where one of the requirements have changed and I was wondering if I could simply update the functionality by changing the JQL.
I have the following table in our database:
select * from project_organization;
ID PROJECT_ID ORG_ID
1 100 1000
2 100 2000
3 200 1000
Our current JQL gets translated as:
select * from project_organization where org_id=2000
ID PROJECT_ID ORG_ID
2 100 2000
I'm trying to write a query that will pull back the following rows:
select po.* from project_organization po
LEFT JOIN project_organization po2
ON po.org_id=po2.org_id and ??????
ID PROJECT_ID ORG_ID
1 100 2000
3 200 null
I've tried a handful of LEFT JOIN queries but so far have been unable to get the results I am looking for.
Can anyone provide any guidance?
Based on the previous comments.