How i make a n1ql its equivalent SQL query?

How I can make a query one to several with multiple tables?

My Sql.

select mail.id,mail.name,address,viewer from archive mail
left outer join archive adress
on address.mailId = mail.Id
left outer join archive viewer
on viewer.mailId = mail.Id
where mail.type = ‘Mail’ and address.type = 'Address’
and viewer.type = ‘Viewer’

My Data.
{
“id” : “Mail_1”,
“name”: “Roberto”,
“description”: “Prueba”,
“type”: “Mail”
}

{
“id” : “Address_1”,
“mailId”: “Mail_1”,
“address”: "jrtaveras@prueba.com",
“type”: “Address”
}

{
“id” : “Viewer_1”,
“mailId” : “Mail_1”,
“name”: “Roberto”,
“department”: “Informatica”,
“type” : “Viewer”
}

Thanks,

Here is the corresponding N1QL.

SELECT mail.id, mail.name, address, viewer
FROM archive mail
LEFT OUTER JOIN archive address
ON KEY address.mailId FOR mail
LEFT OUTER JOIN archive viewer
ON KEY viewer.mailId FOR mail
WHERE mail.type = 'Mail'
AND address.type = 'Address'
AND viewer.type = 'Viewer'
;