On Wed, 2019-05-22 at 14:24 -0400, Reid Thompson wrote:
> On Wed, 2019-05-22 at 19:05 +0100, Simon Slavin wrote:
> > [EXTERNAL SOURCE]
> > 
> > 
> > 
> > On 22 May 2019, at 6:51pm, [email protected] wrote:
> > 
> > > Please add a note to the omitted page that many basic math functions are 
> > > NOT supported. (sqrt,mod,power,stdev,etc.)
> > 
> > Which ones should the documentation mention ?  Can you find us a 
> > specification of SQL which includes that these functions ?  I'm not talking 
> > about a SQL engine you can use, but one of the SQL
> > standards which mentions them, so we know what SQLite leaves out.
> > 
> > Compare SQLite with PostgreSQL:
> > 
> > <
> > 
> 
https://urldefense.proofpoint.com/v2/url?u=https-3A__www.postgresql.org_docs_current_functions-2Dmath.html&d=DwIGaQ&c=w8fEmIi-B5lsC0MnOiGTloUx5YmN70-3jVCmqqbXNxM&r=4r1gVE34nFB7YgioINuzq1cdGrlIBszDh26sKYP7ux8&m=jbjQXvGZh8bReMAfosQNap-8S64F4Q3WwjrDjOA9gGM&s=F9oXfi9o0vpUEQ6Qv_pxcKMHwuLHHbrqTRyq_uqq7_8&e=
> > 
> > PostgreSQL lacks sqrt (though you can do it with power() or with '|/') and 
> > stdev (which you can't do).  Both SQLite and PostgreSQL do modulo, using 
> > the '%' operator.
> > _______________________________________________
> 
> 
> the referenced postgresql page lists sqrt in Mathematical Functions
> sqrt(dp or numeric)   (same as input)         square root     sqrt(2.0)       
> 1.4142135623731
> 
> 
> 

additionally as info,
 https://www.postgresql.org/docs/9.1/functions-aggregate.html

 lists several stddev variants in 

 Table 9-44. Aggregate Functions for Statistics


ala
[local:/home/rthompso/var]:5432 lite@lite=# select stddev(column1) from (select 
* from (values (10),(10),(100),(10)) as points) as foo;
       stddev        
---------------------
 45.0000000000000000
(1 row)

[local:/home/rthompso/var]:5432 lite@lite=# select stddev_pop(column1) from 
(select * from (values (10),(10),(100),(10)) as points) as foo;
     stddev_pop      
---------------------
 38.9711431702997391
(1 row)

[local:/home/rthompso/var]:5432 lite@lite=# select stddev_samp(column1) from 
(select * from (values (10),(10),(100),(10)) as points) as foo;
     stddev_samp     
---------------------
 45.0000000000000000
(1 row)





_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to