Public
Edited
Apr 24, 2023
Insert cell
Insert cell
Insert cell
Insert cell
viewof create_calendar = sql`
CREATE OR REPLACE TABLE calendar AS
FROM range(DATE'2023-04-01',DATE'2023-04-30', interval 1 day) SELECT range date`
Insert cell
Insert cell
con
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
con
SELECT
employeeid,
(SELECT date FROM calendar LEFT JOIN tbl ON date = actual_date),
type,
actual_date
FROM
tbl

Insert cell
con
SELECT employeeid,date FROM calendar full outer JOIN tbl ON date = actual_date
Insert cell
con
create or replace table calendar as from range(DATE'2023-04-01',DATE'2023-04-30', interval 1 day) select range date
Insert cell
con
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
import {sql} from "@cmudig/highlighter"
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