an SQL query from a 3 tables, can't get the results required

后端 未结 1 357
無奈伤痛
無奈伤痛 2021-01-29 10:20

\"enter

\"enter

相关标签:
1条回答
  • 2021-01-29 10:49

    This looks like a generic homework question.

    I suggest you familiarize yourself with this page and site http://use-the-index-luke.com/sql/join.

    Solution:

    Change your statement to:

    SELECT 
        items.title, items.artist, orders.order_date, orders.ship_date
    FROM 
        items 
    JOIN 
        orderline ON orderline.item_id = items.item_id 
    JOIN 
        orders ON orders.order_id = orderline.order_id
    
    0 讨论(0)
提交回复
热议问题