Connect Brevard

Congregational Support for Nonprofits

Tracks support by congregations in volunteers, donations, use of space, etc. to operating nonprofit organizations.
Elapsed time: 05:16:35 - fin: 05:16:46

SELECT j.id, if( length(regOrgs.name) > 0, CONCAT_WS('', regOrgs.name, ' (', regOrgs.city, ')'), CONCAT_WS('', unregOrgs.name, ' (', unregOrgs.city, ')') ) as Org_name, if( length(regCongs.name) > 0, concat_ws('', regCongs.name,' (', regCongs.city, ')'), concat_ws('', unregCongs.name, ' (', unregCongs.city,')' ) ) as Congregation_name, volunteerSupport as Vol_support, financialSupport as Fin_support FROM platform.congregationOrganizationJoin j LEFT JOIN nccs.nteedocAllEins regOrgs ON j.orgEin > ' ' and j.orgEin = regOrgs.ein LEFT JOIN nccs.nteedocNoEin unregOrgs ON j.orgId > 0 and j.orgId = unregOrgs.id LEFT JOIN nccs.nteedocAllEins regCongs ON j.congregationEin > ' ' and j.congregationEin = regCongs.ein LEFT JOIN nccs.nteedocNoEin unregCongs ON j.congregationId > 0 and j.congregationId = unregCongs.id where (regOrgs.fips='12009' OR unregOrgs.fips='12009' OR regCongs.fips='12009' OR unregCongs.fips='12009')