Hi,
You can easily achieve the above using FetchXML for Microsoft Dynamics CRM Online.(Assuming that the query you are asked for is related to reporting).
Go to Advanced Find->Select Contact Entity-> Define your query as below:
1) Select the field(in related fields section of the fields dropdown that links account and contact)(For Example: Account(Primary Contact))
2) Now under this, you will see all account fields
Select the field(indicating they have to receive a newsletter (Y / N).) with the value equals Yes
3) Click "Edit Columns" in advanced find and add the columns(name, email-address and company-name from Contacts)
4)Click Results button.
Now your query is ready. Click "Download FetchXML" to download the FetchXML query".
Please mark it as answer if this answers your question.