Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Rob Sargent
On 01/21/2015 11:31 AM, Pierre Hsieh wrote: updated rule Inline image 1 On Thu, Jan 22, 2015 at 2:28 AM, Pierre Hsieh > wrote: Thanks for your reply. Let me to describe the purpose for this calculation roughly. Column B is for the price of stock.

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Pierre Hsieh
Thanks for your reply. Let me to describe the purpose for this calculation roughly. Column B is for the price of stock. Column C & D are the slope and interception of linear regression from Column B. The final result which I need is the standard deviation on the difference between stock price and

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Paul Jungwirth
Oh sorry, you should leave off the grouping: select stddev(a), stddev(b), stddev(c) from foo; Paul On Wed, Jan 21, 2015 at 10:24 AM, Paul Jungwirth wrote: > Hi Pierre, > > Looking at your Excel document I think I misinterpreted, and you are > trying to take the stddev of each column separately

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Paul Jungwirth
Hi Pierre, Looking at your Excel document I think I misinterpreted, and you are trying to take the stddev of each column separately (which makes a lot more sense!). In the case you can say this: select id, stddev(a), stddev(b), stddev(c) from foo group by id; Paul On Wed, Jan 21, 2015 at 10:15

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Rob Sargent
On 01/21/2015 11:02 AM, Pierre Hsieh wrote: Hi Raymond, Thanks for your reply. Please see detail as following. Thanks again. Pierre Inline image 1 On Thu, Jan 22, 2015 at 1:48 AM, Raymond O'Donnell > wrote: On 21/01/2015 17:32, Pierre Hsieh wrote: > Hi guys,

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Paul Jungwirth
Hi Pierre, It looks like you're saying that each row has an id plus three numeric columns, and you want the stddev calculated from the three numeric columns? In that case you could do this: create table foo (id integer, a float, b float, c float); insert into foo values (1, 2,3,4); insert into fo

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Raymond O'Donnell
On 21/01/2015 18:02, Pierre Hsieh wrote: > Hi Raymond, > > Thanks for your reply. Please see detail as following. Thanks again. Can you describe *in words* what sort of calculation you want to do? Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Pierre Hsieh
Hi Raymond, Thanks for your reply. Please see detail as following. Thanks again. Pierre [image: Inline image 1] On Thu, Jan 22, 2015 at 1:48 AM, Raymond O'Donnell wrote: > On 21/01/2015 17:32, Pierre Hsieh wrote: > > Hi guys, > > > > Thanks for your replies. > > > > I certainly can use VBA

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Raymond O'Donnell
On 21/01/2015 17:32, Pierre Hsieh wrote: > Hi guys, > > Thanks for your replies. > > I certainly can use VBA and ADODB object in Excel to do it. Due to > performance, I wanna try to do it by SQL command in PG. However, I am > not expert in PG, so I need few help from your guys. Let me to describ

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Pierre Hsieh
Hi guys, Thanks for your replies. I certainly can use VBA and ADODB object in Excel to do it. Due to performance, I wanna try to do it by SQL command in PG. However, I am not expert in PG, so I need few help from your guys. Let me to describe my question clearly as following. The final results

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Raymond O'Donnell
On 21/01/2015 16:06, Brian Dunavant wrote: > This is not quite true. I don't believe there are any flight > simulator easter-eggs hidden inside the Postgres code. :) No? Awww. :-) Ray. -- Raymond O'Donnell :: Galway :: Ireland r...@iol.ie -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Brian Dunavant
This is not quite true. I don't believe there are any flight simulator easter-eggs hidden inside the Postgres code. :) On Wed, Jan 21, 2015 at 10:59 AM, Rémi Cura wrote: > More bluntly maybe : > > if you can do it in Excel, > you can do it in Postgres. > > Cheers, > Rémi-C > > 2015-01-21 16:37

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Rémi Cura
More bluntly maybe : if you can do it in Excel, you can do it in Postgres. Cheers, Rémi-C 2015-01-21 16:37 GMT+01:00 Raymond O'Donnell : > On 21/01/2015 14:38, Pierre Hsieh wrote: > > > > > > Hi, > > > > > > > > Would you please tell me whether PostgreSQL can execute the following > > tasks? If

Re: [GENERAL] Fwd: Ask for a question

2015-01-21 Thread Raymond O'Donnell
On 21/01/2015 14:38, Pierre Hsieh wrote: > > > Hi, > > > > Would you please tell me whether PostgreSQL can execute the following > tasks? If not, please also tell me which one can help me for that. Thanks Not clear what you're asking, but if you just want to find the standard deviation of a

[GENERAL] Fwd: Ask for a question

2015-01-21 Thread Pierre Hsieh
Hi, Would you please tell me whether PostgreSQL can execute the following tasks? If not, please also tell me which one can help me for that. Thanks -- *謝宗翰* *|* *台北富邦銀行* *風險管理部* *| 10686**台北市大安區仁愛路四段**169**號**12**樓**| (02) 27716699 **分機* *62853* *Pierre Hsie