Hi Friend i want to merge two tables here is my table....
table 1
Brand TotalStock Transferred date
xxx 100 50 06/03/2014
yyy 100 50 06/03/2014
table 2
Brand Transferred available date
xxx 50 48 06/03/2014
yyy 50 40 06/03/2014
Result Table:
Brand TotalStock Transferred available date
xxx 100 50 48 06/03/2014
yyy 100 50 40 06/03/2014
Result table should be based Date.Can anyone help me out.
Loading

Jignesh TrivediPosted Mar 6, 2014, 4:26 AM
if the relation between table1 and table2 is Brand than agree with Ayin Rivera
other wise you have add more column in join
like
Select
t1.Brand, t1.TotalStock, t1.Transferred, t2.available, t1.date
from Table1 t1
join Table2 t2 on t1.Brand = t2.Brand and t1.Date = t2.Date
hope this will help you.
Ehtesham MehmoodPosted Mar 6, 2014, 5:34 AM
http://developers.cartodb.com/tutorials/joining_data.html
suraj ghosiPosted Mar 6, 2014, 5:22 AM
t1.Brand, t1.TotalStock, t1.Transferred, t2.available, t1.date
from Table1 t1
join Table2 t2 on t1.Brand = t2.Brand and t1.Date = t2.Date
selva kumarPosted Mar 6, 2014, 4:29 AM
Ayin RiveraPosted Mar 6, 2014, 3:57 AM
Try this:
Select
t1.Brand, t1.TotalStock, t1.Transferred, t2.available, t1.date
from Table1 t1
join Table2 t2 on t1.Brand = t2.Brand