Query Bug Fix and Views

Changed a column name in a MySQL query to it's correct value. Added
views to DB so changed queries to reflect this.