Investigations of AGN populations through X-ray and optical surveys