More changes

Update SQL query to reflect table changes