Re: [sqlite] Re: Using AVG() Correctly

2007-02-22 Thread Rich Shepard
On Wed, 21 Feb 2007, Igor Tandetnik wrote: The query looks good. What's the data in the pos column? Could it be that the average is indeed zero? Igor, Of course! I was not thinking it completely through and now it's quite clear. select cat, pos, avg(col1), avg(col2), ... from voting group

[sqlite] Re: Using AVG() Correctly

2007-02-21 Thread Igor Tandetnik
Rich Shepard <[EMAIL PROTECTED]> wrote: I have a table, 'voting,' with 31 columns. For each of 28 REAL columns I need to calculate averages both by groups and total. I tried: sqlite> select AVG(pos) from voting where cat = 'eco'; and 0.0 was returned. The query looks good. What's the data in