Published
Edited
Jun 17, 2022
3 stars
Also listed in…
I'm Learnding
Insert cell
Insert cell
Insert cell
Insert cell
// we've loaded the sqlite file and made it accessible as a database in this notebook
db = FileAttachment("sql-murder-mystery.db").sqlite()
Insert cell
Insert cell
db
Type Table, then Shift-Enter. Ctrl-space for more options.

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

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

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

Insert cell
transcripts = witnessInterviews.map(d => d.transcript)
Insert cell
Insert cell
Insert cell
Insert cell
db
Type Table, then Shift-Enter. Ctrl-space for more options.

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

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

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

Insert cell
Insert cell
Insert cell
db
INSERT INTO solution VALUES (1, 'Jeremy Bowers');
SELECT value FROM solution
Insert cell
Insert cell
Insert cell
db
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Insert cell
db
select distinct d.id as license_id, p.id as person_id, p.name , p.ssn
from drivers_license d
join person p
on d.id = p.license_id
join facebook_event_checkin t
on t.person_id = p.id
where d.height >= 65 and
d.height <= 67 and
d.hair_color == 'red' and
d.car_make == 'Tesla'
Insert cell
Insert cell
db
INSERT INTO solution VALUES (1, 'Miranda Priestly');
SELECT value FROM solution
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// uncomment the line below to see a schema diagram of the database!
// diagram(db)
Insert cell
db
SELECT t.ssn,t.annual_income FROM income t
Insert cell
Insert cell
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