Hi,
can anyone explain me what's the right way to use the group by clause ?
for instance
with this query I get the number of the users group by access_start_datetime,birthday and domain_idPHP Code:SELECT A.domain_id, U.birthday AS field, DATE( access_start_datetime ) AS DATE, COUNT( A.id ) AS value
FROM stats_access A
JOIN users U ON U.id = A.fb_id
GROUP BY DATE( A.access_start_datetime ) , U.birthday, A.domain_id
Is it right ?



Reply With Quote




Bookmarks