Added appropriate sql query to plotRatings.py