This project is aimed at creating multiple SQL queries to obtain information from a news database. The code is expected to have single query to answer individual requests. The objective is to test SQL skills. (This project is for Logs Analysis from Udacity Full Stack Developer Nanodegree)
- Python 2 - version 2.7.12
- Vagrant
- VirtualBox
- Git
The project has three objectives,
- Most popular article of all time
- Most popular article author of all time
- Day on which more than 1% requests led to error
- Install Vagrant and VirtualBox
- Vagrant can be installed using configurations provided by Udacity from here
- Clone this repo
git clone https://github.com/prkksh/Logs-Analysis/
- Open terminal and cd in to the folder vagrant is installed and run 'vagrant up' to launch the linux VM. Once its done, login using 'vagrant ssh' command.
- The files are inside the vagrant folder. To access the files, run
cd /vagrant
- Download the database from here. Move this file in to the vagrant folder.
- From terminal run
psql -d news -f newsdata.sql
- Once the database is set, connect to the database using
psql -d news
- Run the module with
python logs.py