Here's something that should get you started. Disclaimer: I don't use related sites mode, and am not very familiar with how it works, so if you're using that, it might affect the SQL you'll use, as related to the site ID joins below.
This will be a multi-step process. First, you can get the page and role information from mp_pages:
SELECT P.SiteID, P.PageID, P.IncludeInMenu, P.IncludeInSiteMap, P.IncludeInChildSiteMap, P.ParentID, P.PageName, P.PageTitle, P.Url, P.AuthorizedRoles, P.EditRoles, P.CreateChildPageRoles, P.LastModifiedUTC
FROM mp_pages P
WHERE P.SiteID = [site ID]
You'll have to use the pageID/ParentID relationship to build the site page hierarchy.
To get individuals in authorized/edit/create child page roles for page:
Break a comma separated list of role names from the page select into a list of string
For each rolename string, you can get information about the users in that role like this:
SELECT R.RoleName, R.DisplayName, U.UserID, U.LoginName, U.email, U.FirstName, U.LastName
FROM mp_roles R, mp_userroles UR, mp_users U
WHERE R.RoleName = [role string]
AND R.SiteID = [site ID]
AND UR.RoleID = R.RoleID
AND U.UserID = UR.UserID