What are the most popular three articles of all time?
Which articles have been accessed the most?
Present this information as a sorted list with the most popular article at the top
Who are the most popular article authors of all time?
That is, when you sum up all of the articles each author has written, which authors get the most page views?
Present this as a sorted list with the most popular author at the top.
On which days did more than 1% of requests lead to errors?
The log table includes a column status that indicates the HTTP status code that the news site sent to the user's browser.
CREATEVIEWpath_viewASSELECTpath, COUNT(*) AS view
FROM log
GROUP BYpathORDER BYpath;
CREATEVIEWarticle_viewASSELECTauthor_info.name, author_info.title, path_view.viewFROM author_info, path_view
WHEREpath_view.path= CONCAT('/article/', author_info.slug)
ORDER BYauthor_info.name;
CREATEVIEWtotal_viewASSELECTdate(time), COUNT(*) AS views
FROM log
GROUP BYdate(time)
ORDER BYdate(time);
CREATEVIEWerror_viewASSELECTdate(time), COUNT(*) AS errors
FROM log WHERE status ='404 NOT FOUND'GROUP BYdate(time)
ORDER BYdate(time);
CREATEVIEWerror_rateASSELECTtotal_view.date, (100.0*error_view.errors/total_view.views) AS percentage
FROM total_view, error_view
WHEREtotal_view.date=error_view.dateORDER BYtotal_view.date;
About
Udacity Full Stack Web Developer Nanodegree Project : Logs Analysis in Python Postgresql
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products.
Learn more.
We use optional third-party analytics cookies to understand how you use GitHub.com so we can build better products.
You can always update your selection by clicking Cookie Preferences at the bottom of the page.
For more information, see our Privacy Statement.
Essential cookies
We use essential cookies to perform essential website functions, e.g. they're used to log you in.
Learn more
Always active
Analytics cookies
We use analytics cookies to understand how you use our websites so we can make them better, e.g. they're used to gather information about the pages you visit and how many clicks you need to accomplish a task.
Learn more