Skip to content

Instantly share code, notes, and snippets.

View Bilbottom's full-sized avatar
🧙
Mathemagicianing

Bill Bilbottom

🧙
Mathemagicianing
View GitHub Profile
@Bilbottom
Bilbottom / er-diagram.mermaid
Last active July 1, 2024 11:20
Mermaid + DuckDB for generating entity-relationship diagrams
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Bilbottom
Bilbottom / customers-and-loans.sql
Created May 9, 2024 06:05
Mermaid + DuckDB for generating customer hierarchy diagrams
/*
Mermaid + DuckDB for generating customer hierarchy diagrams
DuckDB version: 0.10.2
Bill Wallis, 2024-05-09
*/
select version();
@Bilbottom
Bilbottom / bank-holidays.sql
Last active May 9, 2024 06:18
DuckDB for dynamically parsing JSON data from a URL
/*
DuckDB for dynamically parsing JSON data from a URL
DuckDB version: 0.10.2
Bill Wallis, 2024-05-09
*/
select version();
@Bilbottom
Bilbottom / duckdb-glob-pattern.sql
Created May 10, 2024 20:00
DuckDB's `FROM` statement accepts glob patterns
/*
DuckDB's `FROM` statement accepts glob patterns
DuckDB version: 0.10.2
Bill Wallis, 2024-05-10
*/
select version();
@Bilbottom
Bilbottom / values-statement.sql
Created May 21, 2024 20:24
The SQL `VALUES` statement
/*
The SQL `VALUES` statement (in DuckDB)
DuckDB version: 0.10.2
Bill Wallis, 2024-05-21
*/
select version();
@Bilbottom
Bilbottom / datelist-integers.sql
Created June 19, 2024 12:41
Datelist integers for true/false attribute history
/*
Datelist integers for true/false attribute history
DuckDB version: 0.10.2
Bill Wallis, 2024-06-19
*/
select version();
select version(); -- DuckDB v1.0.0
/* https://www.linkedin.com/posts/constantin-lungu-668b8756_sql-bigquery-dataengineering-activity-7212478238265139201-dS4y */
create or replace table weather_alerts (
city_id int,
alert_name varchar,
valid_from date,
valid_to date,