Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
13
Task/Filter/DuckDB/filter-1.duckdb
Normal file
13
Task/Filter/DuckDB/filter-1.duckdb
Normal 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.
|
||||
7
Task/Filter/DuckDB/filter-2.duckdb
Normal file
7
Task/Filter/DuckDB/filter-2.duckdb
Normal 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;
|
||||
1
Task/Filter/DuckDB/filter-3.duckdb
Normal file
1
Task/Filter/DuckDB/filter-3.duckdb
Normal file
|
|
@ -0,0 +1 @@
|
|||
create temporary table evens select * from nos where v%2=0;
|
||||
1
Task/Filter/DuckDB/filter-4.duckdb
Normal file
1
Task/Filter/DuckDB/filter-4.duckdb
Normal file
|
|
@ -0,0 +1 @@
|
|||
create temporary table evens as from nos where v%2=0;
|
||||
1
Task/Filter/DuckDB/filter-5.duckdb
Normal file
1
Task/Filter/DuckDB/filter-5.duckdb
Normal file
|
|
@ -0,0 +1 @@
|
|||
DELETE FROM nos WHERE v%2=1;
|
||||
2
Task/Filter/DuckDB/filter-6.duckdb
Normal file
2
Task/Filter/DuckDB/filter-6.duckdb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
select list_filter(lst, v -> v % 2 = 0) as evens, lst
|
||||
from (select range(1,11) as lst);
|
||||
3
Task/Filter/DuckDB/filter-7.duckdb
Normal file
3
Task/Filter/DuckDB/filter-7.duckdb
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
create or replace function evens(lst) as (
|
||||
list_filter(lst, v -> v % 2 = 0)
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue