Standard Deviation for SQLite

You can calculate the variance in SQL: create table t (row int); insert into t values (1),(2),(3); SELECT AVG((t.row – sub.a) * (t.row – sub.a)) as var from t, (SELECT AVG(row) AS a FROM t) AS sub; 0.666666666666667 However, you still have to calculate the square root to get the standard deviation.

SQLite Select from where column contains string?

SELECT * FROM users WHERE column LIKE ‘%mystring%’ will do it. LIKE means we’re not doing an exact match (column = value), but doing some more fuzzy matching. “%” is a wildcard character – it matches 0 or more characters, so this is saying “all rows where the column has 0 or more chars followed … Read more

How to extract number of currently opened tabs?

Open the about:telemetry link in Firefox and click scalars tab from the sidebar menu. Alternatively, opening about:telemetry#scalars-tab_search=tab will take you directly to the scalars tab. The browser.engagement.max_concurrent_tab_count key will show the number of tabs active for the session, but does not update when a tab is closed. Instead, if you want to update this value … Read more

Why is the same SQLite query being 30 times slower when fetching only twice as many results?

The execution time geometrically proportional to the number of rows in each table rather than arithmetically e.g. 3 tables with 10 rows each => 1,000 comparision 3 tables with 10, 10 and 40 rows => 4,000 comparisons 3 tables with 20 rows each => 8,000 comparisons You could probably re-factor the query to avoid some … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)