alexa

Join multiples tables query in SQL ?

Join multiples tables query in SQL ?

Can you try this? Is this as per your requirement? @pierredupont

 select 
    t1.date, t1.brand, t1.to, t1.metric1, t1.metric2, 
    t2.metric3, t3.metric4 
into 
    tain_with_metrics
from 
    table_1 t1 
left join 
    table_2 t2 on t1.date = t2.date 
               and t1.brand = t2.brand 
               and t1.to = t2.to 
left join 
    table_3 t3 on t3.date = t1.date 
               and t3.from = t2.from 
               and t3.to = t1.to
inner join 
    table_2 t4 on t4.date = t1.date
               and t4.to = t1.to

302 0
7

Write a Comments


* Be the first to Make Comment

GoodFirms Badge
GoodFirms Badge

Fix Your Meeting With Our SEO Consultants in India To Grow Your Business Online

Facebook
Twitter
LinkedIn
Instagram
Whatsapp
Call Now
Quick Inquiry