Public
Edited
Apr 26
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chinook.db
select Name
from tracks;
Insert cell
Insert cell
chinook.db
select BillingCountry as Country
from invoices;
Insert cell
Insert cell
chinook.db
select distinct BillingCountry as Country
from invoices;
Insert cell
Insert cell
Insert cell
chinook.db
select CustomerId as Id, firstname, country
from customers;
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chinook.db
select *
from invoices
where billingCountry = "Germany";
Insert cell
Insert cell
Insert cell
chinook.db
select *
from invoices
where billingCountry = "Germany" or billingCountry = "France" or billingCountry = "USA";
Insert cell
chinook.db
select *
from invoices
where billingCountry = "Germany" and billingCity <> "Berlin";
Insert cell
chinook.db
select *
from invoices
where billingCountry = "France" and billingCity <> "Paris";
Insert cell
Insert cell
Insert cell
chinook.db
select InvoiceDate as Date, CustomerId, Total
from invoices
where Date between '2010-01-01' AND '2012-01-01';
Insert cell
chinook.db
select invoiceDate as dates, customerId, total
from invoices
where dates between '2010-01-01' and '2011-01-01';
Insert cell
chinook.db
select Name, milliseconds
from tracks
where milliseconds between 250000 and 300000 or milliseconds between 350000 and 400000;
Insert cell
Insert cell
Insert cell
chinook.db
select FirstName, LastName, Title
from employees
where Title in ('General Manager', 'Sales Manager', 'IT Manager');
Insert cell
chinook.db
select *
from invoices
where BillingCountry in ('Germany', 'France', 'USA');
Insert cell
Insert cell
Insert cell
chinook.db
select invoiceId, InvoiceDate, Total
from invoices
where BillingCountry in ('USA', 'Canada') and total > 8;
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chinook.db
select title, count(title) as numEmployees
from employees
group by title;
Insert cell
chinook.db
select total, billingcountry
from invoices
group by billingcountry;
Insert cell
Insert cell
Insert cell
chinook.db
Type SQL, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
chinook.db
select billingcountry, total as totalsales
from invoices
group by billingcountry
order by totalsales desc
Insert cell
Insert cell
Insert cell
chinook.db
--your code goes here

Insert cell
Insert cell
Insert cell
chinook.db
--your code goes here

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chinook.db
select artists.name, albums.title
from artists
inner join albums on artists.artistid = albums.artistid
order by artists.name asc;
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chinook.db
Type SQL, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Insert cell
chinook.db
--your code goes here

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chinook.db
Type SQL, then Shift-Enter. Ctrl-space for more options.

Insert cell
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