Answer the question
In order to leave comments, you need to log in
How to select Type, Brand and Product Name from the specified database schema with one query?
Good afternoon!
Can anyone tell me how to select the Type, Brand and Product Name from the specified database schema with one query?
For example, pulling out the Type and Product Name is not difficult:
Select
type.name AS 'Type',
device.name AS 'Product'
FROM type_device
LEFT JOIN type ON (type.id = type_device.typeId)
LEFT JOIN device ON (device.id = type_device.deviceId)
But, I can’t understand how to get in a place with a Type, a Name, and also, for example, a Brand in a similar request?
Select
type.name AS 'Type',
device.name AS 'Product',
brand.name AS 'Brand'
....
Thanks in advance for your help!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question