Need some help using Tereadata I need to pull a report that joins many tables... Here is the basic concept:
Select Table1.ID, Table2.Arrival_date, Table2.Name
From Table1
Inner Join Table1.ID on Table2.ID
Where table2.arrival_date between '10/01/2013' and '10/02/2013'
Then there is another table that includes the following information
ID Item Cost Date
1 Flour 1.99 10/02/2013
2 cheese 3.99 10/01/2013
3 Flour 1.99 8/16/2013
I want to add this to the table above
Select Itemtable.ID, Itemtable.item, itemtable.cost, itemtable.date
from itemtable
where itemtable.date between '10/01/2013' and 10/02/2013
and itemtable.item like '%flour%'
Itemtable.ID = Table1.ID - but when I do a join I only get those customers who bought flour - I want all of the customers seen between that date frame and, if they bought flour want it - my final table would look like this:
ID Arrival Date Name ID Item Cost Date
1 10/01/2013 Dan
2 10/01/2013 Mike
3 10/01/2013 Nancy
1 10/02/2013 Dan 1 Flour 1.99 10/02/2013
5 10/02/2013 Mary
Any help would be appreciated!