Oracle query to Postgres with subqueries
I am trying to convert an application from Oracle to Postgres. I'm having lots of issues with the queries since Oracle has a somewhat different syntax and rules when it comes to joining.
Below is the Oracle query I am using. Maybe someone can help me convert this to Postgres, and it will also help me understand how to do this in the future?
Many thanks in advance:
SELECT a.ticker, a.current_recommendation, a.date_recommended, b.suggested_recommendation. b.date_suggested, b.suggested_by c.approved_recommendation, c.date_approved, c.approved_by FROM (SELECT ticker, current_recommendation, date_recommended FROM zacks_recommendation) a, (SELECT ticker, suggested_recommendation, date_suggested, suggested_by FROM suggested_recommendations s, recommendation_users u WHERE s.suggested_by = u.user_id) b, (SELECT ticker, approved_recommendation, date_approved, approved_by FROM approved_recommendations a, recommendation_users u WHERE a.approved_by = u.user_id) c WHERE a.ticker = b.ticker(+) AND a.ticker = c.ticker(+);
Thank you again.