SELECT
	d.id           AS id,
	d.officialname AS name,
	d.latitude     AS lat,
	d.longitude    AS lng
FROM datasources d 
	LEFT OUTER JOIN api a ON (d.id = a.datasource)
WHERE a.active = true AND d.latitude IS NOT NULL AND d.longitude IS NOT NULL
