Query the Strava Mirror (SQL)
strava_queryRun a read-only DuckDB SQL query against the athlete's stored Strava data (possibly incomplete; check sync status). Enforced read-only transaction, 30 seconds, 5000 rows maximum; no file/network access.
Instructions
Run a read-only DuckDB SQL query against the athlete's stored Strava data (possibly incomplete; check sync status). Enforced read-only transaction, 30 seconds, 5000 rows maximum; no file/network access. Use strava_schema first to see the tables. Main tables: activity, activity_stream_point (per-point streams: time, distance, lat, lng, altitude, heartrate, cadence, watts, temp, velocity_smooth, grade_smooth), activity_lap, activity_split, activity_best_effort, activity_segment_effort, segment, activity_zone_bucket, gear, route, athlete_stats. Units: meters, seconds, m/s. raw_current holds every payload as JSON (column body) for fields not in a typed table. Costs no Strava API calls.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One DuckDB SELECT statement (DESCRIBE, SUMMARIZE and EXPLAIN also work). | |
| max_rows | No | Maximum rows to return (default 200). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| rows | Yes | ||
| columns | Yes | ||
| row_count | Yes | ||
| truncated | Yes |