Сайтостроительство


         

Анализ посетителей веб-сайта - часть 6


printf("<h4>Ссылки - распределение по страницам</h4>"); LString_Format(sql_query, "SELECT COUNT(*) as q, shref, href FROM hit \ WHERE DATE_FORMAT(it_date, '%%Y-%%m-%%d')='%s' \ GROUP BY shref, href ORDER BY q DESC LIMIT 0,20", *day); printTable(pDB, *sql_query);

printf("<h4>Ссылки - распределение по доменным именам</h4>"); LString_Format(sql_query, "SELECT COUNT(*) as q, shref FROM hit \ WHERE DATE_FORMAT(it_date, '%%Y-%%m-%%d')='%s' \ GROUP BY shref ORDER BY q DESC LIMIT 0,20", *day); printTable(pDB, *sql_query);

printf("<h4>Распределение хитов по хостам</h4>"); LString_Format(sql_query, "CREATE TEMPORARY TABLE IF NOT EXISTS hh \ SELECT COUNT(*) as hit, ip FROM hit \ WHERE DATE_FORMAT(it_date, '%%Y-%%m-%%d')='%s' \ GROUP BY ip ORDER BY hit DESC", *day);

mysql_query(pDB, *sql_query); printTable(pDB, "SELECT * FROM hh LIMIT 0,20");

printf("<h4>Среднее количество страниц, открываемых одним пользователем</h4>"); printTable(pDB, "SELECT AVG(hit) FROM hh");

printf("<h4>Распределение по операционным системам </h4>"); printTable(pDB, "SELECT COUNT(*) as q, os FROM hit \ GROUP BY os ORDER BY q DESC");

printf("<h4>Распределение по броузерам</h4>"); printTable(pDB, "SELECT COUNT(*) as q, browser FROM hit \ GROUP BY browser ORDER BY q DESC");

printf("<h4>Распределение по версиям броузеров</h4>"); printTable(pDB, "SELECT COUNT(*) as q, browser, version FROM hit \ GROUP BY browser, version ORDER BY q DESC ");

printf("<h4>Распределение по разрешению экрана</h4>"); printTable(pDB, "SELECT COUNT(*) as q, CONCAT(x, 'x', y) as res FROM hit \ GROUP BY res ORDER BY q DESC ");

printf("<h4>Распределение по количеству цветов</h4>"); printTable(pDB, "SELECT COUNT(*) as q, depth FROM hit GROUP BY depth ORDER BY q DESC");




Содержание  Назад  Вперед