项目作者: egochen

项目描述 :
SQL queries
高级语言: Python
项目地址: git://github.com/egochen/LogsAnalysis.git
创建时间: 2019-02-13T04:12:20Z
项目社区:https://github.com/egochen/LogsAnalysis

开源协议:

下载


Project: Logs Analysis

This is a reporting tool that prints out reports (in plain text) based on the
data in the database. This reporting tool is a Python program using the
psycopg2 module to connect to the database. The tool answers the following three questions:

  1. What are the most popular three articles of all time?
  2. Who are the most popular article authors of all time?
  3. On which days did more than 1% of requests lead to errors?

Setup

You will need to install the following softwares:

The data to use can be downloaded here. Unzip this file after downloading it. The file inside is called newsdata.sql. To use load data, use the command psql -d news -f newsdata.sql.

Usage

Run project1.py in your terminal. You should see outputs on the terminal
which are the same as those shown in output_example.txt