summaryrefslogtreecommitdiff
path: root/graphs/sql/outsourcing/req03.sql
diff options
context:
space:
mode:
authorMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:08:27 +0200
committerMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:08:27 +0200
commitc9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c (patch)
tree3e4f42f93c7ae89a364e4d51fff6e5cec4e55fa9 /graphs/sql/outsourcing/req03.sql
add: graphs et rushs
Diffstat (limited to 'graphs/sql/outsourcing/req03.sql')
-rw-r--r--graphs/sql/outsourcing/req03.sql5
1 files changed, 5 insertions, 0 deletions
diff --git a/graphs/sql/outsourcing/req03.sql b/graphs/sql/outsourcing/req03.sql
new file mode 100644
index 0000000..226a7e1
--- /dev/null
+++ b/graphs/sql/outsourcing/req03.sql
@@ -0,0 +1,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'