Re: How to get a count from this query

2005-10-14 Thread SGreen
Gerald Taylor <[EMAIL PROTECTED]> wrote on 10/14/2005 10:42:33 AM: > Thank you for your answer. What I'm trying to do is return the scores of >the diff values of datapoints between a particular user and all the > other users in the system. (hence the mypmd.uid != pmd.uid) Some > datapoin

Re: How to get a count from this query

2005-10-13 Thread SGreen
Gerald Taylor <[EMAIL PROTECTED]> wrote on 10/13/2005 12:20:53 PM: > SELECT avg(abs(pmd.value) - (mypmd.value))) as diff, pm.mname, pmd.uid > FROM pmdata pmd, mnames pm, pmdata mypmd > WHERE mypmd.uid= ? > AND pmd.pmid=pm.pmid AND mypmd.pmid=pm.pmid > AND pmd.uid != mypmd.uid GROUP BY pmd.pmid

How to get a count from this query

2005-10-13 Thread Gerald Taylor
SELECT avg(abs(pmd.value) - (mypmd.value))) as diff, pm.mname, pmd.uid FROM pmdata pmd, mnames pm, pmdata mypmd WHERE mypmd.uid= ? AND pmd.pmid=pm.pmid AND mypmd.pmid=pm.pmid AND pmd.uid != mypmd.uid GROUP BY pmd.pmid, pmd.uid ORDER BY pmd.uid What I would like also to return in this query is a