HI all,
It is possible to do something like this:
SELECT tbl1.fld1, (AVG(tbl2.fld1) WHERE tbl2.fld1>0) FROM ......
What I mean here is that I want to calculate avg only from fields >0 but I want to list all records but some will not have AVG at all. It's list of movies and in tbl2 I keep peoples scores (marks for movies) and only some of them have entries. I need >0 becouse the same table keeps people comments and if there is comment left but no score it will be automatically filled with 0.
It is possible to do something like this:
SELECT tbl1.fld1, (AVG(tbl2.fld1) WHERE tbl2.fld1>0) FROM ......
What I mean here is that I want to calculate avg only from fields >0 but I want to list all records but some will not have AVG at all. It's list of movies and in tbl2 I keep peoples scores (marks for movies) and only some of them have entries. I need >0 becouse the same table keeps people comments and if there is comment left but no score it will be automatically filled with 0.