Public
Edited
Jun 17, 2023
Insert cell
Insert cell
Insert cell
Insert cell
import { pizzeriaDB } from '@observablehq/pizza-paradise-data'
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
whereIHaveLived = [
{location: "Magdeburg", date: "2000-01-01"},
{location: "Poughkeepsie", date: "2005-09-01"},
{location: "Prague", date: "2007-09-01"},
{location: "Poughkeepsie", date: "2008-01-01"},
{location: "Brooklyn", date: "2009-06-01"},
{location: "Boulder", date: "2011-08-01"},
{location: "Brooklyn", date: "2013-04-01"},
{location: "Boulder", date: "2019-12-01"},
]
Insert cell
whereIHaveLived
SELECT location FROM whereIHaveLived
Insert cell
Insert cell
Insert cell
pizzeriaDB
SELECT * FROM products
Insert cell
Insert cell
Insert cell
pizzeriaDB
SELECT name,
price,
category,
ingredients
FROM products
Insert cell
Insert cell
Insert cell
pizzeriaDB
SELECT DISTINCT name
FROM products
Insert cell
Insert cell
pizzeriaDB
SELECT DISTINCT name, size
FROM products
Insert cell
Insert cell
Insert cell
pizzeriaDB
SELECT price,
count(*) as product_prices,
FROM products
GROUP BY price
Insert cell
Insert cell
pizzeriaDB
SELECT name,
count(*) as num_products
FROM products
GROUP BY name
Insert cell
pizzeriaDB
SELECT count(*) as num_products
FROM products
Insert cell
pizzeriaDB
SELECT count(distinct state) as num_stores
FROM stores
Insert cell
Insert cell
pizzeriaDB
SELECT count(distinct name) as num_products
FROM products
Insert cell
pizzeriaDB
SELECT count(*) as num_products
FROM products
Insert cell
Insert cell
pizzeriaDB
SELECT Category
, avg(Price) as avg_price
, count(*) as num_products
FROM products
GROUP BY Category
Insert cell
Insert cell
pizzeriaDB
SELECT Category,
count(distinct Price) as price
FROM products
GROUP BY Category
Insert cell
Insert cell
pizzeriaDB
SELECT Category
, "Size"
, avg(Price) as avg_price
, count(*) as num_products
FROM products
GROUP BY Category
, "Size"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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