mysql select * from contacts + email and account

I need to get all Contacts from the Mysql DB WITH email and
How do I have to join the tables?

select first_name,last_name,title,department,phone_mobile,phone_work,phone_fax,birthday,primary_address_street,primary_address;
but mail adress and have to be joined…

any suggestions?
Thanks, Sebastian
PS: i found but am not sure if this works with suitecrm. And api is much slower then getting things via SQL-Query…

Here it is.

SELECT,contacts.first_name,,email_addresses.email_address FROM contacts
	INNER JOIN accounts_contacts ON accounts_contacts.contact_id = AND accounts_contacts.deleted=0
        INNER JOIN accounts ON = accounts_contacts.account_id AND accounts.deleted=0
        LEFT JOIN email_addr_bean_rel eabr ON eabr.bean_id = AND eabr.deleted=0 AND eabr.bean_module='Contacts' 
        LEFT JOIN email_addresses ON = eabr.email_address_id AND email_addresses.deleted=0

thanks for the quick answer!!!