Your first analysis.
Ten minutes from cold install to a chart you can show someone. We'll use the Chinook sample database that ships with Orchid, so there's nothing to provision.
What you'll build
A two-cell notebook: a SQL cell that pulls the top-selling genres from Chinook, and a Python cell that turns the result into a bar chart. By the end you'll have touched every major surface of the IDE — the notebook, SQL execution, the kernel, and the chart renderer.
Orchid installed (see install) and at least one project created (see first project). No external database needed.
1. Open Orchid
Launch Orchid. If this is your first time, you'll land on the project shelf. Click New project, pick an empty folder anywhere on disk (something like ~/orchid/first-analysis is fine), and Orchid opens with a blank notebook.
2. Connect to the Chinook sample
Chinook is a classic SQLite database modeling a digital music store — invoices, customers, tracks, genres. Orchid bundles a copy so you can experiment without setting anything up.
Open Integrations (the plug icon in the activity bar), click + Add connection, and choose Sample » Chinook (SQLite). Orchid registers a read-only connection profile pointed at the bundled file. The schema browser on the left fills in with tables: Album, Artist, Customer, Invoice, InvoiceLine, Track, and friends.
3. Add a SQL cell
Click the + SQL button below the empty notebook to add a SQL cell. In the cell's integration dropdown (top-right of the cell), pick Chinook. Now any query you write runs against the sample.
Paste this into the cell — it asks for the ten genres with the most invoice line revenue:
SELECT
g.Name AS genre,
ROUND(SUM(il.UnitPrice * il.Quantity), 2) AS revenue,
COUNT(*) AS line_count
FROM InvoiceLine il
JOIN Track t ON t.TrackId = il.TrackId
JOIN Genre g ON g.GenreId = t.GenreId
GROUP BY g.Name
ORDER BY revenue DESC
LIMIT 10;4. Run it
Hit Cmd-Enter (macOS) or Ctrl-Enter (Linux). The cell runs, the result table appears beneath it, and Orchid exposes the rows to the Python kernel as a DataFrame named after the cell — genres if you didn't rename it.
Click the variable pill in the cell footer to rename it. Anything you set is what the next Python cell will reference — keep it short.
5. Chart the result in Python
Click + Python to add a code cell below. The kernel is already warm (Orchid booted a project-scoped Python environment when you opened the notebook) and it has the SQL result in scope.
import plotly.express as px
fig = px.bar(
genres,
x="genre",
y="revenue",
title="Top 10 Genres by Revenue (Chinook sample)",
labels={"genre": "Genre", "revenue": "Revenue (USD)"},
)
fig.update_layout(template="plotly_dark", margin=dict(l=20, r=20, t=60, b=80))
figRun the cell with Cmd-Enter. The bar chart renders inline. Hover any bar for tooltips, click the legend to filter, drag a region to zoom.
6. Add a markdown narrative
A notebook isn't just code. Click + Markdown and write a short explanation of what you just found. Markdown cells render live as you type and accept the full GitHub-flavored syntax.
## What I learned
- **Rock** dominates revenue — roughly **2x** the runner-up.
- Latin and Metal trail close behind, but with very different line counts.
- Niche genres (Sci-Fi, Comedy) barely register; safe to drop from the next merch order.Drag the markdown cell above the chart if you want it as a section header. Cells reorder by drag handle on the left edge.
7. Save and you're done
Orchid autosaves on every edit. The notebook is a plain YAML file inside your project folder — open it in any text editor to inspect the format.
orchid: '1.0'
metadata:
title: First analysis
created: '2026-05-14T09:00:00Z'
python_version: '3.11'
blocks:
- id: blk_01
type: sql
integration: chinook
output_variable: genres
source: |-
SELECT g.Name AS genre, ...
- id: blk_02
type: code
language: python
source: |-
import plotly.express as px
fig = px.bar(genres, ...)
figBecause notebooks are YAML, git diff produces sensible output. Commit them like any other source file.
Where to go next
- SQL cells — parameters, schema-aware autocomplete, result reuse across cells.
- Chart cells — when to use a dedicated chart block versus calling Plotly from Python.
- Build a revenue dashboard — pin the cells you just wrote to a shareable dashboard.
- Work with the agent — let Orchid draft the next analysis for you.