From c9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c Mon Sep 17 00:00:00 2001
From: Martial Simon <msimon_fr@hotmail.com>
Date: Mon, 15 Sep 2025 01:08:27 +0200
Subject: add: graphs et rushs

---
 graphs/sql/vault_cataloging/req04.sql | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 graphs/sql/vault_cataloging/req04.sql

(limited to 'graphs/sql/vault_cataloging/req04.sql')

diff --git a/graphs/sql/vault_cataloging/req04.sql b/graphs/sql/vault_cataloging/req04.sql
new file mode 100644
index 0000000..9276b1c
--- /dev/null
+++ b/graphs/sql/vault_cataloging/req04.sql
@@ -0,0 +1,32 @@
+WITH filtered_times AS (
+    SELECT
+        COALESCE(
+            NULLIF(rsa_time,0),
+            (SELECT MAX(rsa_time) FROM dtf.madelines_files_results)
+        ) AS rsa_time,
+        COALESCE(
+            NULLIF(hyper_pulse_time,0),
+            (SELECT MAX(hyper_pulse_time) FROM dtf.madelines_files_results)
+        ) AS hyper_pulse_time,
+        COALESCE(
+            NULLIF(quantum_x_time,0),
+            (SELECT MAX(quantum_x_time) FROM dtf.madelines_files_results)
+        ) AS quantum_x_time,
+        COALESCE(
+            NULLIF(aes_time,0),
+            (SELECT MAX(aes_time) FROM dtf.madelines_files_results)
+        ) AS aes_time,
+        COALESCE(
+            NULLIF(d_crypt_time,0),
+            (SELECT MAX(d_crypt_time) FROM dtf.madelines_files_results)
+        ) AS d_crypt_time
+    FROM dtf.madelines_files_results
+)
+
+SELECT
+    AVG(rsa_time)::numeric(10,2) AS avg_rsa_time,
+    AVG(hyper_pulse_time)::numeric(10,2) AS avg_hyper_pulse_time,
+    AVG(quantum_x_time)::numeric(10,2) AS avg_quantum_x_time,
+    AVG(aes_time)::numeric(10,2) AS avg_aes_time,
+    AVG(d_crypt_time)::numeric(10,2) AS avg_d_crypt_time
+FROM filtered_times
-- 
cgit v1.2.3

