LibsqlError: SQLITE_ERROR: no such function: SQRT

Hi I'm trying to implement an SQLite command in libsql with the help of drizzle. I'm getting error SQRT function not available. It seems SQLITE doesn't come with the functions by default. Is this the case with libSQL too? If so how can I get it working 💆🏾‍♂️
CREATE VIEW view1 AS
SELECT
t.index_no,
(
(t.total - AVG(t.total) OVER()) / (
SELECT SQRT(AVG(t.total * t.total) - (AVG(t.total) * AVG(t.total)))
FROM view2
)
) as zscore
FROM view2 AS t`);
CREATE VIEW view1 AS
SELECT
t.index_no,
(
(t.total - AVG(t.total) OVER()) / (
SELECT SQRT(AVG(t.total * t.total) - (AVG(t.total) * AVG(t.total)))
FROM view2
)
) as zscore
FROM view2 AS t`);
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server