From 68378066a8236a17a6014264e69fa37c19522b2f Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Sun, 5 Mar 2023 17:54:02 -0800 Subject: [PATCH] Added example of AVG [skip ci] --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 994d789..64fc98b 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,12 @@ SELECT * FROM items WHERE embedding <-> '[3,1,2]' < 5; Note: Combine with `ORDER BY` and `LIMIT` to use an index +Get the average of vectors + +```sql +SELECT AVG(embedding) FROM items; +``` + ## Indexing Speed up queries with an approximate index. Add an index for each distance function you want to use.