blob: 226a7e15fe68588258147733d850ed753c9e1465 (
plain)
1
2
3
4
5
|
SELECT person_id, first_name, last_name, birth_date, classification, description
INTO TEMPORARY TABLE pg_temp.not_guilty
FROM justice.trials AS T, justice.cases AS C, justice.outcomes AS O, public.people AS P, justice.defendants AS D
WHERE T.case_id = C.id AND O.trial_id = T.id AND D.trial_id = T.id AND D.person_id = P.id
AND O.outcome = 'NOT_GUILTY'
|