/sqlSaaS Revenue Cohort Retention & Net Dollar Expansion SQL
Self-contained PostgreSQL query with synthetic CTE dataset computing monthly logo retention, MRR expansion, contraction, and churn.
Ready-to-Run Prompt Template
Mode: normalWrite a complete, runnable PostgreSQL query using WITH CTE sample data that computes monthly SaaS Cohort Retention, Net Dollar Retention (NDR), expansion MRR, and churned MRR using window functions. Also recommend composite indexes and explain the query plan.
Recommended Fusta Skills for This Prompt
Writes production PostgreSQL/ClickHouse/Firestore schemas, window-function analytics, and index tuning plans.
Audits code for race conditions, off-by-one errors, XSS/injection flaws, and runs an agentic post-generation review on complex code.
More Ready-to-Run Templates
High-Throughput Time-Series p95/p99 Latency & Z-Score Anomaly SQL
Detects API latency spikes using rolling window percentiles, Z-score deviation thresholds, and BRIN/partitioned indexing.
Live Canvas UIInteractive Pomodoro & Sprint Focus Studio
Builds a single-file dark Pomodoro focus studio with customizable intervals, priority task queue, session stats, and SVG progress rings.
Live Canvas UILLM KV-Cache & GPU VRAM Cluster Simulator
Interactive React dashboard calculating FP16/INT8/INT4 model weights, KV-cache growth across 4K–1M tokens, and multi-GPU H100/A100 tensor parallelism.