Page MenuHomeDevCentral

D3184.id8112.diff
No OneTemporary

D3184.id8112.diff

diff --git a/sql/db-A/agora/operations-grimoire-older-pages.sql b/sql/db-A/agora/operations-grimoire-older-pages.sql
new file mode 100644
--- /dev/null
+++ b/sql/db-A/agora/operations-grimoire-older-pages.sql
@@ -0,0 +1,18 @@
+-- Agora
+-- What Operations Grimoire pages are older than 6 months?
+
+USE nasqueron_wiki;
+
+SELECT
+ -- page_link example: [Operations grimoire/Kubernetes|Kubernetes]]
+ REPLACE(CONCAT("[[", page_title, "|", SUBSTRING(page_title, 21), "]]"), "_", " ") as page_link,
+
+ -- age in days (1 day = 86400 seconds)
+ FLOOR((UNIX_TIMESTAMP() - UNIX_TIMESTAMP(page_touched)) / 86400) as age
+FROM
+ page
+WHERE
+ LEFT(page_title, 20) = "Operations_grimoire/"
+ AND LEFT(page_title, 29) != "Operations_grimoire/Incidents"
+HAVING age > 180
+ORDER BY page_touched DESC;

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 19:55 (19 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2267494
Default Alt Text
D3184.id8112.diff (812 B)

Event Timeline