This app runs queries against posgresql database then get the result and show it to the user.
Use a terminal on Linux or Mac or install the terminal that provided with git on Windows. https://git-scm.com/ Download and install VirtualBox from https://virtualbox.org/ Download and install Vagrant from https://www.vagrantup.com/ Download and unzip the file from https://github.com/udacity/fullstack-nanodegree-vm Using the terminal, change to the extracted directory. Then change to the vagrant directory. Download this file: https://d17h27t6h515a5.cloudfront.net/topher/2016/August/57b5f748_newsdata/newsdata.zip. Then extract it. Then copy the newsdata.sql to the vagrant directory. Inside the vagrant directory and using the terminal run: vagrant up. Then run Vagrant ssh. Run: psql -d news -f newsdata.sql Download and install python 2 from https://www.python.org/ Download and install psycopg2 from http://initd.org/psycopg/docs/install.html Download and unzip the file of this repository. Copy report_tool.py to the vagrant directory. Within the vagrant directroy and using your terminal run: python report_tool.py
https://www.postgresql.org/docs/9.1/static/functions-string.html
https://stackoverflow.com/a/7415245 by: Mohamed Saligh.
https://dba.stackexchange.com/a/24779 by: matadur.
https://stackoverflow.com/a/772439 by: Jason.
https://stackoverflow.com/a/5846102 by: Alex Aza.
https://www.postgresql.org/message-id/200305140824.35328.josh%40agliodbs.com
https://www.postgresql.org/message-id/Pine.LNX.4.44.0305081102100.30051-100000%40brave.cs.uml.edu
https://www.postgresql.org/message-id/24226.1052925819%40sss.pgh.pa.us
https://www.postgresql.org/message-id/20030122224044.P7070-100000%40megazone23.bigpanda.com
https://stackoverflow.com/a/1183936 by: hobodave.
https://stackoverflow.com/a/35335272/6401707 by: zen.
https://stackoverflow.com/a/13113623/6401707 by: Craig Ringer.
http://initd.org/psycopg/docs/usage.html
https://stackoverflow.com/a/21189383 by: Nigel Tufnel.
https://stackoverflow.com/questions/935/string-literals-and-escape-characters-in-postgresql
https://stackoverflow.com/questions/6331504/omitting-the-double-quote-to-do-query-on-postgresql
http://blog.lerner.co.il/quoting-postgresql/