Public
Edited
Sep 27, 2023
Insert cell
Insert cell
chinook.db
SELECT name FROM sqlite_schema
Insert cell
chinook.db
SELECT * FROM artists

Insert cell
chinook.db
SELECT * FROM tracks
Insert cell
chinook.db
SELECT * FROM albums
Insert cell
db = DuckDBClient.of({
artists:artistsFile,
albums:albumsFile,
tracks:tracksFile
})
Insert cell
db
SELECT tracks.Name AS song,Title AS album,Artists.Name AS band
FROM tracks INNER JOIN albums
ON tracks.AlbumID = albums.AlbumID
INNER JOIN artists
ON albums.ArtistID = artists.ArtistID
WHERE Milliseconds = (
SELECT min(Milliseconds)
FROM tracks
)
Insert cell
db
SELECT tracks.Name AS song,Title AS album,Artists.Name AS band,Milliseconds
FROM tracks INNER JOIN albums
ON tracks.AlbumID = albums.AlbumID
INNER JOIN artists
ON albums.ArtistID = artists.ArtistID
WHERE band != 'The Rolling Stones' AND song IN(
SELECT tracks.Name
FROM tracks INNER JOIN albums
ON tracks.AlbumID = albums.AlbumID
INNER JOIN artists
ON albums.ArtistID = artists.ArtistID
WHERE artists.Name = 'The Rolling Stones'
)
Insert cell
db
SELECT tracks.Name
FROM tracks INNER JOIN albums
ON tracks.AlbumID = albums.AlbumID
INNER JOIN artists
ON albums.ArtistID = artists.ArtistID
WHERE artists.Name = 'Soundgarden'
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more