Can I get some help with a MySQL JOIN?
Basically I have 4 tables, traders, streetaccounts (that are associated with a trader), recommendation_brokerages and recommendations. I need to get all the traders names and email addresses from the traders table, where the traders streetaccount.brokerage_id exists in the recommendation_brokerages table and in the recommendations table.
Here is the basic structure of my tables.
tbl_traders
--------------------------------------
trader_id | trader_name | email
--------------------------------------
tbl_streetaccounts
--------------------------------------
trader_id | brokerage_id
--------------------------------------
tbl_recommendation_brokerages
--------------------------------------
recommendation_id | brokerage_id
--------------------------------------
tbl_recommendations
--------------------------------------
recommendation_id | published
--------------------------------------