List:General Discussion« Previous MessageNext Message »
From:m i l e s Date:August 8 2005 7:10pm
Subject:Query HELP!
View as plain text  
Hi,

IS the following query counting cumulative (see below **) pHITS or is  
it counting individual counts for each user for a particular day.  Im  
not skilled enough to answer this question myself.  My instinct says  
that its counting cumulative values and NOT individual counts for  
each property name.

SELECT
search_members.Property_Name AS pNAME,
search_members.Property_Email AS pEMAIL,
MAX(user_count.u_datetime) AS pDATE,
**COUNT(user_count.u_userid) AS pHITS
FROM search_members INNER JOIN user_count ON  
search_members.Property_ID = user_count.u_userid
GROUP BY pNAME, pEMAIL, search_members.Property_ID
ORDER BY pDATE DESC

I have a feeling that the COUNT line should be something similar to  
select distinct statement....

Any ideas ?

Sincerely,

M i l e s.
Thread
Query HELP!m i l e s8 Aug
  • Re: Query HELP!SGreen8 Aug
    • Re: Query HELP!m i l e s8 Aug
      • Re: Query HELP!SGreen8 Aug
  • Re: Query HELP!Peter Brawley8 Aug