Query Editor Overview
The query editor provides a streamlined interface for writing and executing SQL queries.Key Features
- Syntax highlighting - DuckDB SQL syntax with monospace font
- Keyboard shortcuts - Press Ctrl+Enter (Cmd+Enter on Mac) to execute
- Command queue - Execute multiple queries in sequence
- Real-time updates - Results appear instantly and sync across team members
- Query history - Every query is logged with reproducibility in mind
Writing Your First Query
Write a SELECT Query
Start with a simple SELECT statement to view your data:This retrieves the first 10 rows from your table.
Execute the Query
Press Ctrl+Enter (or Cmd+Enter on Mac) or click the Execute button. Results appear immediately in the data table below.
Common SQL Operations
Filtering Data
Use WHERE clauses to filter rows based on conditions:Aggregating Data
DuckDB excels at analytical queries with aggregations:Joining Tables
Combine data from multiple tables:Updating Data
Modify existing records in your tables:Adding New Rows
Insert data into your tables:Advanced DuckDB Features
Window Functions
Perform calculations across sets of rows:Date/Time Operations
DuckDB provides powerful date functions:String Manipulation
Command Queue
Meridian supports executing multiple SQL commands in sequence. This is perfect for complex data transformations.Write Multiple Commands
Separate your SQL statements with semicolons or use the AI agent to generate a command queue.
Query Logging & Reproducibility
Every query you execute is automatically logged for reproducibility and auditing.What Gets Logged
Benefits of Query Logging
- Reproducibility - Replay any analysis to understand how insights were discovered
- Auditing - Track who made changes and when
- Debugging - Review failed queries to fix issues
- Collaboration - See what queries teammates have run
- Learning - Study successful queries from your team
Real-Time Collaboration
When you execute a query, all team members viewing the same table see results update instantly.Live Updates Powered by ConvexMeridian uses Convex’s reactive subscriptions to push updates to all connected clients. When you run a query:
- Results are computed by DuckDB
- Convex detects the data change
- All subscribed clients receive updates automatically
- UI refreshes with new data in milliseconds
Performance Tips
Use Column Selection
Use Column Selection
Instead of DuckDB’s columnar storage makes this especially efficient.
SELECT *, specify only the columns you need:Filter Early
Filter Early
Apply WHERE clauses before joins and aggregations:
Use LIMIT for Exploration
Use LIMIT for Exploration
When exploring large datasets, add LIMIT clauses:
Leverage DuckDB's Speed
Leverage DuckDB's Speed
DuckDB is optimized for analytical queries:
- Millions of rows? No problem.
- Complex aggregations? Lightning fast.
- Multiple joins? Handled efficiently.
Error Handling
When a query fails:- The error message appears in the query editor
- The query is logged with error details
- You can modify and re-run immediately
- Previous results remain visible
What’s Next?
Use AI Agents
Let AI write SQL queries for you with natural language
Create Charts
Visualize your query results with interactive charts