Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3787828
D3184.id8112.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
812 B
Referenced Files
None
Subscribers
None
D3184.id8112.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D3184: Publish SQL queries for Agora NOG
Attached
Detach File
Event Timeline
Log In to Comment