Answer the question
In order to leave comments, you need to log in
How to find printer manufacturers?
Good day, toastermen!!
There was a problem with task execution on sql-ex.ru.
There is a database schema:
The database schema consists of four tables:
Product(maker, model, type)
PC(code, model, speed, ram, hd, cd, price)
Laptop(code, model, speed, ram, hd, price, screen )
Printer(code, model, color, type, price)
The Product table represents the manufacturer (maker), model number (model) and type ('PC' - PC, 'Laptop' - notebook PC or 'Printer' - printer). Model numbers in the Product table are assumed to be unique across all manufacturers and product types. In the PC table for each PC, uniquely identified by a unique code - code, the model is indicated - model (foreign key to the Product table), speed - speed (processor in megahertz), memory size - ram (in megabytes), disk size - hd (in gigabytes), reader speed - cd (for example, '4x') and price - price. The Laptop table is similar to the PC table, except that instead of the CD speed, it contains the screen size -screen (in inches). The Printer table for each printer model indicates whether it is color - color ('y' if color),
Q:
How to find printer manufacturers?
Answer the question
In order to leave comments, you need to log in
If I understood the task correctly, then:
SELECT pd.maker FROM `printer` pt JOIN `product` pd
ON pt.model = pd.model
GROUP BY pd.maker
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question