Update

modified the query to fit with changes in some table schema and to get more information