i need a query to select most expensive product for every maker [duplicate]

妖精的绣舞 提交于 2020-12-15 02:41:08

问题


the query that i tried is this i try to use a inner join

Select l.model,l.price,p.model,p.price
from LAPTOP l Inner Join PRINTER p ON  (l.model = p.model)
Where Price IN (Select Max (Price) from Product)

i got this output

column ambiguously defined

so my tables are this

                                              *Laptop*
SERIAL_NUMBER   MODEL   PRICE   SPEED   RAM HD  SCREEN

                                              *Printer*
PRICE  MODEL   COLOR   TYPE
                                              *Product*
MODEL   MAKER   TYPE

来源:https://stackoverflow.com/questions/64638066/i-need-a-query-to-select-most-expensive-product-for-every-maker

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!