Refactor queries into multiple lines for readability