alins Posted January 17, 2006 Report Posted January 17, 2006 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
Venom Posted January 17, 2006 Report Posted January 17, 2006 ilgi neesmu ņēmies ar mysql, bet varētu būt vai nu group by datums, ip, vai nu k-kas līdzīgs COUNT(DISTINCT( CONCAT(ip,DATE_FORMAT(laiks,'%Y%m%d')) ) )
alins Posted January 17, 2006 Author Report Posted January 17, 2006 kurš tieši risinājums? (: nevajag nemaz GROUP BY SELECT COUNT(DISTINCT(CONCAT(ip,DATE_FORMAT(laiks,'%Y%m%d')))) FROM tabula
Recommended Posts