Data update

This commit is contained in:
Ingy döt Net 2025-08-11 18:05:26 -07:00
parent 4d5544505c
commit 4924dd0264
3073 changed files with 55820 additions and 4408 deletions

View file

@ -0,0 +1,13 @@
--Create the original array (table #nos) with numbers from 1 to 10
create table nos (v int);
insert into nos from range(1,11);
--Select the subset that are even into the new array (table #evens)
create table evens as (from nos where v % 2 = 0);
-- Show #evens
from evens;
# There is no need to drop the tables just for sake of repeating, because
# DuckDB supports "CREATE OR REPLACE", but the basic DROP TABLE syntax
# is the same.

View file

@ -0,0 +1,7 @@
create temporary table nos (v int);
insert into nos values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
create temporary table evens (v int);
insert into evens select v from nos where v%2=0;
select * from evens order by v;
drop table nos;
drop table evens;

View file

@ -0,0 +1 @@
create temporary table evens select * from nos where v%2=0;

View file

@ -0,0 +1 @@
create temporary table evens as from nos where v%2=0;

View file

@ -0,0 +1 @@
DELETE FROM nos WHERE v%2=1;

View file

@ -0,0 +1,2 @@
select list_filter(lst, v -> v % 2 = 0) as evens, lst
from (select range(1,11) as lst);

View file

@ -0,0 +1,3 @@
create or replace function evens(lst) as (
list_filter(lst, v -> v % 2 = 0)
);