updated SQL queries for request visualize