Hello, I hope someone here is willing to help me out with my sql problem.
I've got three tables, each table is linked with each other by the field product_id.
I want to select all unique product_id's from Table1 which have been generated between two certain dates (dates are in Table2).
So far no problem, I wrote this sql statement:
But I also need to retrieve a certain field ('Pr_orderid') from Table3, I haven't got a clue how to retrieve this field though since I allready have a select statement in my sql query.Code:SELECT DISTINCT product_id From Table1 INNER JOIN Table2 ON Table2.product_id=Table1.product_id INNER JOIN Table3 ON Table3.product_id=Table1.product_id where DATE(Table2.date_added)>='2014-02-01' and DATE(Table2.date_added)<='2014-03-01' Order by Table2.date_added DESC
How can I build in an extra select statement for this Table3 field ?