Skip to content

SQL Analyzer

The SQL Analyzer gives you direct read access to your local PGLite (WASM PostgreSQL) database. Run any SELECT query, explore the schema, and export results — all in your browser.

★ Pro The SQL Analyzer is a Pro-only feature.

The collapsible sidebar lists every table and view in your local database:

Table Contents
vault_info Vault metadata (name, leader, TVL, APR, PnL history)
vault_details Vault state (portfolio, leverage, margins, drawdown)
vault_asset_positions Open positions per vault
vault_fills Trade fills (time, coin, price, size, side, PnL)
vault_ledger_updates Deposit/withdrawal events
vault_user_info Per-user vault data (equity, PnL, lockup)
user_vault_equities User equity balances
vault_signals Computed quantitative signals
vault_ai_analyses LLM analysis results
vault_ai_threads AI chat threads
vault_ai_messages AI chat messages
vault_master_view Master vault listing (view)
wallet_leaderboard_view Leaderboard computation (view)
vault_fills_aggregated_view Aggregated fills (view)

Click any table to see its column names and types. This is a read-only view — only SELECT queries are allowed.

Write SQL in the editor with:

  • Line numbers for easy reference
  • Syntax highlighting for SQL keywords
  • Format Keywords button to clean up SQL formatting
  • Clear to reset the editor

Running queries: Press Ctrl+Enter or click “Run” to execute. Results appear in the panel below. Multiple statements separated by semicolons produce multi-tab results.

Query results display in a sortable table. Each result tab corresponds to a statement in a multi-statement query.

Cell Viewer — Click any cell to open a popup for inspecting large values (JSON, long text).

Your last 25 queries are saved automatically. Browse history to re-run or reference previous queries. History persists in your browser’s local storage.

-- Top 10 vaults by TVL
SELECT vault_name, tvl, apr, leader_performance
FROM vault_master_view
ORDER BY tvl DESC
LIMIT 10;
-- My vaults with performance grades
SELECT vault_name, equity, user_pnl, lp, dp
FROM vault_master_view
WHERE user_address = 'your_wallet_here';
-- Recently filled trades above $10K
SELECT vf.time, vf.coin, vf.side, vf.price, vf.closed_pnl, vi.vault_name
FROM vault_fills vf
JOIN vault_info vi ON vf.vault_id = vi.vault_id
WHERE vf.closed_pnl > 10000
ORDER BY vf.time DESC;