alins Posted January 17, 2006 Report Share 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 Link to comment Share on other sites More sharing options...
Venom Posted January 17, 2006 Report Share 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')) ) ) Link to comment Share on other sites More sharing options...
alins Posted January 17, 2006 Author Report Share Posted January 17, 2006 paldies, ir tas ko vajag! Link to comment Share on other sites More sharing options...
Venom Posted January 17, 2006 Report Share Posted January 17, 2006 kurš tieši risinājums? (: Link to comment Share on other sites More sharing options...
alins Posted January 17, 2006 Author Report Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts