Public
Edited
Oct 18, 2023
Insert cell
Insert cell
db
SELECT tracks.Name
FROM tracks
WHERE
tracks.GenreID IN (
SELECT genres.GenreID genres.Name, (Milliseconds / 60000.0) AS duration
FROM tracks
INNER JOIN genres USING (GenreId)
GROUP BY 1
ORDER BY duration DESC
LIMIT 5)
Insert cell
milliseconds
Insert cell
Plot.plot({
marks: [
Plot.rectY(milliseconds, Plot.binX({y: "count"}, {x: "duration"})),
Plot.ruleY([0])
]
})
Insert cell
db = FileAttachment("chinook.db").sqlite()
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more