Runs SQL queries to a data base, parses the results and refreshes charts with those results