Re: Searching for big differences between values

2017-11-30 Thread Laurenz Albe
Durumdara wrote: > Somewhere the users made mistakes on prices (stock). > > I need to search for big differences between values. > For example: > > 20 > 21 > 21,5 > 30 > 28 > .. > 46392 <- > 46392 <- > > But it could be: > > 42300 > 43100 > 44000 > 43800 > 65000 <- > 42100 > > Human eye could

Re: Searching for big differences between values

2017-11-30 Thread Rory Campbell-Lange
On 30/11/17, Durumdara (durumd...@gmail.com) wrote: > Somewhere the users made mistakes on prices (stock). > > I need to search for big differences between values. > For example: > > 20 > 21 > 21,5 > 30 > 28 > .. > 46392 <- > 46392 <- You could use window functions https://www.postgresql.org/doc

Re: Searching for big differences between values

2017-11-30 Thread Chris Mair
I need to search for big differences between values. [...] Hi, from an SQL point of view this is not difficult, but you need to carefully define a criteria for the outliers. For example, to find values that are more than a standard deviation away from the mean, do something like this: chris=#

Re: Searching for big differences between values

2017-11-30 Thread Chris Travers
On Nov 30, 2017 08:35, "Durumdara" wrote: Hello! Somewhere the users made mistakes on prices (stock). I need to search for big differences between values. For example: 20 21 21,5 30 28 .. 46392 <- 46392 <- But it could be: 42300 43100 44000 43800 65000 <- 42100 Human eye could locate these

Searching for big differences between values

2017-11-29 Thread Durumdara
Hello! Somewhere the users made mistakes on prices (stock). I need to search for big differences between values. For example: 20 21 21,5 30 28 .. 46392 <- 46392 <- But it could be: 42300 43100 44000 43800 65000 <- 42100 Human eye could locate these values, but there we need to check 30.000 ar