Jump to content
php.lv forumi

select - sum


alins

Recommended Posts

ir tabula kuraa glabaajas ip, laiks(timestamp), u.c. info...

 

redzemais selects atgriezh unikaalo ip skaitu katrai dienai...

nevaru izdomaat kaa ar selectu dabuut kopeejo summu pa visaam dienaam!

 

SELECT COUNT(DISTINCT(ip)) AS dienaa, DATE_FORMAT(laiks,'%Y%m%d') AS datums FROM tabula GROUP BY datums

Link to comment
Share on other sites

×
×
  • Create New...