Description
Once you have identified the one-product manufacturers, the next step is identifying untrustworthy ones that supply subpar products. As a computer store manager, one way to identify unreliable manufacturers is to look for those that produce slow PCs or laptops. This can be a helpful strategy in determining which manufacturers to avoid in the future and ensuring that your store only stocks high-quality products.
Objectives
- Find the
makerthat produces computer models (this includesLaptopsandPCs) with the lowest speed; - Output the
makerandmodelinformation from theProducttable, along with thespeedandpricedetails from either theLaptoporPCtable.
Take a look at the following database structure:
Explanation of Database
The Product table stores information about manufacturers (maker), model numbers (model), and product types (type). The model numbers in the Product table are unique across all manufacturers and product types.
The PC table contains information about each personal computer, identified by a unique code (pc_code). A PC model is indicated using a foreign key to the Product table (model). Other specifications include the processor speed (speed) in megahertz, memory size (ram) in megabytes, hard disk capacity (hd) in gigabytes, the CD reader speed (cd) such as DVD, and the price (price) in dollars.
The Laptop table is similar to the PC table, but instead of the CD reader speed, it includes the screen size (screen) in inches.
The Printer table provides information about each printer model, such as whether it is color (color, indicated by C for color printers and B for black printers), the printer type (type, which can be Laser for laser printers, Jet for inkjet printers, or Matrix for matrix printers), and the price (price) in dollars.
Click on the link to download the SQL query for creating the database.
Examples
WITH my_table AS (SELECT a.maker, a.model, b.speed ...;