Public
Edited
Apr 24
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
chinook.db
select Name
from artists;
Insert cell
Insert cell
chinook.db
select billingcountry as country
from invoices;
Insert cell
Insert cell
chinook.db
select distinct billingcountry 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" or billingcountry = "France" or billingCountry = "USA";
-- This is how one can commit in the code
Insert cell
Insert cell
Insert cell
chinook.db
SELECT * from invoices where billingcountry = "Germany" and billingcity <> "Berlin";
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 name, milliseconds from tracks where milliseconds between 250000 and 300000 or milliseconds between 35000 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 all invoices from USA Germany and france
Select *
from invoices
where billingcountry in ('Germany', 'France', 'USA');
Insert cell
chinook.db
Select name, unitprice from tracks where unitprice in (0.99);
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
select title, count(title) as numEmployees
from employees
group by title;
Insert cell
Insert cell
Insert cell
chinook.db
select billingcountry, sum(total) from invoices group by billingcountry;
Insert cell
Insert cell
chinook.db
select billingcountry, sum(total) as totalSales from invoices group by billingcountry
order by totalSales desc
Insert cell
chinook.db
select name
from artists
order by name asc
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 , albums.title 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