Playbook Overview

The Playbook is a collection of short, actionable recipes that demonstrate how to accomplish specific tasks with QuestDB. Each recipe follows a problem-solution-result format, making it easy to find and apply solutions quickly.

What is the Playbook?

Unlike comprehensive reference documentation, the Playbook focuses on practical examples for:

  • Common SQL patterns - Window functions, pivoting, time-series aggregations
  • Programmatic integration - Language-specific client examples
  • Operations - Deployment and configuration tasks

Each recipe provides a focused solution to a specific problem, with working code examples and expected results.

Structure

The Playbook is organized into three main sections:

  • SQL Recipes - Common SQL patterns, window functions, and time-series queries
  • Programmatic - Language-specific client examples and integration patterns
  • Operations - Deployment, configuration, and operational tasks

Running the Examples

Most recipes run directly on our live demo instance at demo.questdb.com without any local setup. Queries that can be executed on the demo site are marked with a direct link to run them.

For recipes that require write operations or specific configuration, the recipe will indicate what setup is needed.

The demo instance contains live FX market data with tables for core prices and order book snapshots. See the Demo Data Schema page for details about available tables and their structure.

Using the Playbook

Each recipe follows a consistent format:

  1. Problem statement - What you're trying to accomplish
  2. Solution - Code example with explanation
  3. Results - Expected output or verification
  4. Additional context - Tips, variations, or related documentation links

Start by browsing the SQL Recipes section for common patterns, or jump directly to the recipe that matches your needs.