Home build a sql sql syntax
Reply: 0

build a sql sql syntax

user2344
1#
user2344 Published in June 20, 2018, 7:20 am
+----+--------------+------+--------+---------+---------------------+-----------
| Id | ip           | uri  | status | browser | time                |refer   ..........
+----+--------------+------+--------+---------+---------------------+-----------
int    varchar       varchar int     varchar   timeStampe            varchar  ..........
-------------------------------------------------------------------------------

This is the structure of my table used to save the tomcat logs(pattern is combine) here.

Now I want to do some types of statistics,however I am not good at sql words,so I ask it here.

statistics type is:

1) query which pages are requested most at a same monment. Then I want to show them in a table. 2)query which files are requested most at a same monment. Then I want to show them in a table. 3)query from where (the refer )visitor jump to the site,sort the refers.

update

THe example of the log:

127.0.0.1 - - [19/Oct/2010:20:38:43 +0800] "GET /tomcat.gif HTTP/1.1" 200 1934 "http://localhost:9000/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10"
127.0.0.1 - - [19/Oct/2010:20:38:43 +0800] "GET /asf-logo-wide.gif HTTP/1.1" 200 5866 "http://localhost:9000/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10"
127.0.0.1 - - [19/Oct/2010:20:38:43 +0800] "GET /tomcat-power.gif HTTP/1.1" 200 2324 "http://localhost:9000/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10"
127.0.0.1 - - [19/Oct/2010:20:38:43 +0800] "GET /favicon.ico HTTP/1.1" 200 21630 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10"
127.0.0.1 - - [19/Oct/2010:20:38:46 +0800] "GET /manager/html HTTP/1.1" 401 1833 "http://localhost:9000/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10"
127.0.0.1 - - [19/Oct/2010:20:38:49 +0800] "GET /manager/status HTTP/1.1" 401 1833 "http://localhost:9000/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10"

The /tomcat.gif /asf-logo-wide.gif are files.

/manager/status /manager/html are pages.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.446714 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO