Re: [SQL] DIVISION with Group By

2008-12-09 Thread Richard Huxton
hdhgdh mjhff wrote: > Hai all, > > I am new to SQL coding. > I need some help in writing SQL > In my task i have to calculate division of two sub queries. > each sub query has its own group by clause. Can you provide a simpler example? It's not obvious to me what you're trying to do. -- Richa

Re: [SQL] Division in Postgre

2005-05-01 Thread hatuan
Thank you - Original Message - From: "Stephan Szabo" <[EMAIL PROTECTED]> To: "tuan" <[EMAIL PROTECTED]> Cc: Sent: Saturday, April 30, 2005 10:56 AM Subject: Re: [SQL] Division in Postgre > On Sun, 24 Apr 2005, tuan wrote: > > > In sql serv

Re: [SQL] Division in Postgre

2005-04-29 Thread Stephan Szabo
On Sun, 24 Apr 2005, tuan wrote: > In sql server my division select cast(3 as float)/10 is 0.299. > But in postgres select cast(3 as float8)/10 is 0.3. How to get result like > sql server? I believe you can control what precision is used in printing the float results with extra_float_digi

Re: [SQL] Division

2000-09-18 Thread Jie Liang
Hi, there, I don't quit sure what you really want to solve, however, if you use EXCEPT results1 and result2 should be same type rather than tables, i.e. select a,b from tab1 except select c,d from tab2; a,c are same type b,d are same type. notes, EXCEPT to big table is not efficient, so does IN