Platform
Resources
Pricing
Sign in
Get started
Amanda Shih
Workspace
Fork
Public
houston data jams: workshops: Intro to SQL
By
Amanda Shih
Edited
Mar 16, 2024
Insert cell
Insert cell
Insert cell
neighbors_data
SELECT
*
FROM
order_details
WHERE
"Opened" = NULL;
Insert cell
neighbors_data
SELECT
MIN("Opened")
FROM
order_details
Insert cell
Insert cell
neighbors_data
SELECT
MIN("Opened"),
MAX("Opened"),
SUM("Amount")
FROM
order_details
Insert cell
Insert cell
neighbors_data
SELECT
MIN("Opened"),
MAX("Opened"),
SUM("Amount"),
"Tip"
FROM
order_details
Insert cell
Insert cell
neighbors_data
SELECT
MIN("Opened"),
MAX("Opened"),
SUM("Amount"),
ARRAY_AGG("Tip", ', ')
FROM
order_details
Insert cell
Insert cell
neighbors_data
SELECT
MIN("Opened"),
MAX("Opened"),
SUM("Amount"),
STRING_AGG(DISTINCT "Tip", ', ' ORDER BY "Tip" DESC) -- distinct tips only, and put the highest amounts first
FROM
order_details
WHERE
"Opened" > '2024'
Insert cell
Insert cell
neighbors_data
DESCRIBE order_details;
Insert cell
neighbors_data
-- SELECT
-- COUNT("Order Id"),
-- COUNT(DISTINCT "Order Id")
-- FROM
-- order_details
Insert cell
Insert cell
Insert cell
neighbors_data
Type SQL, then Shift-Enter. Ctrl-space for more options.
Insert cell
Insert cell
neighbors_data
Type SQL, then Shift-Enter. Ctrl-space for more options.
Insert cell
separator
Insert cell
Insert cell
Insert cell
neighbors_data
.
describe
(
)
Insert cell
neighbors_data
.
summarize
(
'order_details'
)
Insert cell
neighbors_data
.
describeColumns
(
{
table
:
'order_details'
}
)
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
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
neighbors_data
File attachments
Databases
aggregations__example_01
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Cells
neighbors_data
File attachments
Databases
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
aggregations__example_02
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Cells
neighbors_data
File attachments
Databases
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
aggregations__example_03
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Cells
neighbors_data
File attachments
Databases
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
aggregations__example_04
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Cells
neighbors_data
File attachments
Databases
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
aggregations__example_05
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Cells
neighbors_data
File attachments
Databases
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
neighbors_data
File attachments
Databases
aggregations__question_01
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Cells
neighbors_data
File attachments
Databases
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
aggregations__exercise_01
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Cells
neighbors_data
File attachments
Databases
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
aggregations__exercise_02
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Cells
neighbors_data
File attachments
Databases
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
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML