broke long sql statement for readability