culiops/culiops-skills / skills/sre-investigate
sre-investigate
Unverifiedanalytics/sql/waf/compare_days.sql
View on GitHub-- Per terminating rule: requests on day a vs day b and the delta (b - a), top 50 by absolute change; required params: a, b (YYYY-MM-DD), a missing param is an error. If sampled: requests_a, requests_b and delta (same rate on both days) scale by the factor.
WITH p AS (
SELECT CAST(CASE WHEN getvariable('a') IS NULL THEN error('param a is required') ELSE getvariable('a') END AS DATE) AS a,
CAST(CASE WHEN getvariable('b') IS NULL THEN error('param b is required') ELSE getvariable('b') END AS DATE) AS b
)
SELECT terminating_rule_id AS rule,
count(*) FILTER (WHERE CAST(ts AS DATE) = p.a) AS requests_a,
count(*) FILTER (WHERE CAST(ts AS DATE) = p.b) AS requests_b,
count(*) FILTER (WHERE CAST(ts AS DATE) = p.b) - count(*) FILTER (WHERE CAST(ts AS DATE) = p.a) AS delta
FROM logs, p
WHERE CAST(ts AS DATE) IN (p.a, p.b)
GROUP BY terminating_rule_id
ORDER BY abs(delta) DESC, rule
LIMIT 50
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |