Platform
Resources
Pricing
Sign in
Get started
Malik Koné
seed, teach, grow
Workspace
Fork
Published
Translations
By
Malik Koné
Edited
Apr 9, 2020
Fork of
Connecting to databases
3
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
client
=
DatabaseClient
(
"Baby Names"
)
Insert cell
Insert cell
names
=
client
.
query
(
`SELECT name, gender, year, SUM(number) AS number
FROM names
WHERE year > ?
GROUP BY name, gender, year`
,
[
1920
]
)
Insert cell
horizon
(
names
)
Insert cell
Insert cell
client
.
queryRow
(
`SELECT MIN(year) AS year
FROM names
WHERE name = ?`
,
[
"Loki"
]
)
Insert cell
Insert cell
client
.
explain
(
`SELECT MIN(year) AS year
FROM names
WHERE name = ?`
,
[
"Loki"
]
)
Insert cell
table
=
client
.
describe
(
"names"
)
Insert cell
Insert cell
table
.
value
Insert cell
Insert cell
client
.
describe
(
)
Insert cell
Insert cell
Insert cell
Insert cell
import
{
MockDatabaseClient
as
DatabaseClient
}
from
"cc1c4f2583af6f34"
Insert cell
yearExtent
=
[
1920
,
2018
]
Insert cell
import
{
chart
as
horizon
}
with
{
yearExtent
}
from
"@visnup/baby-names-by-birth-year@1015"
Insert cell
import
{
support
}
from
"4188fd23699b2b3d"
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.
Try it for free
Learn more
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dc
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
client
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
query
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
names
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
queryRow
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
explain
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
table
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
describe
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
yearExtent
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML