Troubleshooting MySQL Subquery

Job ID: 37835296

Budget: $10 – $30 USD

I'm currently in need of assistance with a MySQL query task; specifically how to make use of a subquery in order to yield accurate results in a Select statement. The main purpose here is to fetch data.

**** All SQL files are attached to the files for this project.

What I am Seeking:

Help with the attached query. The query joins two tables. A header and details table. The intent of the subquery in this statement is to find/match a SINGLE "Invoice Date" value in the inv_details table that matches a "PO Date" from the po_details table in the subquery using the main queries currently matching "item" , "ship to city" and "customer name".

Using "distinct" in the subquery generates an error (subquery returns more than one row) while "max" generates duplicates.

This task implies a lot of technicality and understanding, hence, I encourage those who have confident skills in this area to place their bids. Can't wait to work together!
Related categories: SQL MySQL Database Programming