| PersonID | Name | IncidentID| Role | MissingOffender|
| -- | ----- | -- | ------- | ---- |
| 1 | Tom | 20 |Victim | |
| 2 | Steve | 20 |Offender | |
| 3 | Susan | 20 |Offender | |
| 4 | John | 21 |Offender | |
| 5 | Bill | 21 |Victim | |
| 6 | Larry | 22 |Victim | Y |
| 7 | Bert | 23 |Offender | |
I have a table that contains data for various behaviors and the people involved in those incidents. Incidents can have and offender only, but if there's a victim, there needs to be an offender.
I'd like to add a column to my query (MissingOffender) that can tell me if a victim is "orphaned" meaning there is no offender associated with the same IncidentID.
Is this possible? I'm not sure what this type of thing is called to google, so apologies in advance, but thank you for any assistance.
Asked by theonlynewts
(3 rep)
Mar 7, 2024, 04:53 PM
Last activity: Mar 7, 2024, 08:35 PM
Last activity: Mar 7, 2024, 08:35 PM