This will return the partition name, search space name, user alias and extension for the primary extension of all subscribers:
SELECT vw_searchspacemember.partitionname, vw_searchspacemember.SearchSpaceName, vw_subscriber.alias, vw_dtmfaccessid.DtmfAccessId
FROM vw_searchspacemember, vw_subscriber, vw_dtmfaccessid
WHERE vw_searchspacemember.partitionobjectid=vw_dtmfaccessid.PartitionObjectId
AND vw_subscriber.ObjectId = vw_dtmfaccessid.Parent_SubscriberObjectId
AND vw_dtmfaccessid.IdIndex=0
if you want to filter on a specific searchspace name you can add:
AND vw_searchspacemember.SearchSpaceName='xxx'