Skip to content

Instantly share code, notes, and snippets.

@Bilbottom
Last active July 27, 2024 07:12
Show Gist options
  • Save Bilbottom/48f777e0ac9f590b6ef6a8d75a413fa2 to your computer and use it in GitHub Desktop.
Save Bilbottom/48f777e0ac9f590b6ef6a8d75a413fa2 to your computer and use it in GitHub Desktop.
Friendly SQL with DuckDB
/*
Friendly SQL with DuckDB
DuckDB version: 1.0.0
Bill Wallis, 2024-07-25
Demonstrating some DuckDB features described by Alex Monahan at:
https://duckdb.org/docs/sql/dialect/friendly_sql
*/
select version();
create or replace table ducks(
duck_name varchar,
duck_type varchar
);
insert into ducks
values
('Rubber Ducky', 'household'),
('Donald Duck', 'cartoon '),
('Daffy Duck', 'cartoon ')
;
from ducks
select * replace(
duck_name.lower().trim() as duck_name
)
order by all
;
@Bilbottom
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment