Skip to content

zach-col/log_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

log_analysis Project to query a news database for


1 top three articles
2 top authors
3 day's with http failed request's greater then 1%

To use view the query data
1 clone this repo
2 download the database
database download
3 save the database download in the directory of the cloned repo
4 run this command to connect to the database this will also
run the sql commands in newsdata.sql file
$ psql -d news -f newsdata.sql
4.5 run the command "psql news" to log in to the news database
5 create errorCount view in the news Database
CREATE VIEW errorCount AS
SELECT CAST(time AS DATE), COUNT(*)
FROM log
WHERE status!='200 OK'
GROUP BY CAST(time AS DATE);

6 create totalCount view in the news Database
CREATE VIEW totalCount AS
SELECT CAST(time AS DATE), COUNT(*)
FROM log
GROUP BY CAST(time AS DATE);
6.5 to exit the database press ctrl + z 7 run the command $ python data.py
8 this will show the results of query's

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages