KEY, embedding VECTOR(3) NOT NULL); INSERT INTO items (id, embedding) VALUES (0, '[0.1, 2, 3]'), (1, '[-4.24, 5, 6]’); DECLARE @target AS VECTOR(3)='[3,1,2]'; SELECT * FROM items ORDER BY VECTOR_DISTANCE('cosine', embedding, @target); SELECT *, VECTOR_DISTANCE('cosine', embedding, @target) distance FROM items ORDER BY distance