I have 2 tables as follows (sample data shown):
TableName: A
ID Type
1 Bug
2 Requirement
3 Task
4 Specification
5 Bug
6 Specification
7 Production Issue
8 Production Issue
9 Bug
10 Task
Tablename: B
ID RelatedID
1 2
1 7
5 8
5 4
9 6
9 10
I want to fetch all the bugs that have atleast one related production issue or bugs that have no related production issue.
Expected output will be as shown below (since these are the bugs with at least one related production issue)
output
1
5