mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-25 08:46:49 +02:00
init pass vec_min vec_max vec_avg
This commit is contained in:
parent
6875f7649c
commit
44dcb3b391
3 changed files with 333 additions and 0 deletions
21
test.sql
Normal file
21
test.sql
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
.load dist/vec0
|
||||
.mode box
|
||||
.header on
|
||||
|
||||
create table test as
|
||||
select value
|
||||
from json_each('[
|
||||
[1.0, 2.0, -3.0],
|
||||
[-1.0, 2.0, 3.0],
|
||||
[1.0, 2.0, 3.0],
|
||||
[1.0, 2.0, 3.0],
|
||||
[1.0, -2.0, 3.0]
|
||||
]');
|
||||
|
||||
select
|
||||
vec_to_json(vec_min(value)),
|
||||
vec_to_json(vec_max(value)),
|
||||
vec_to_json(vec_avg(value))
|
||||
from test;
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue