
Working for an online computer shop, you have been asked to assist customers in finding the best computer deal to match their requirements and needs. Your shop has access to a large variety of laptop and desktop computers and hence you should be able to recommend a computer for every customer!
To make the right recommendation to your customers, you have been given access to an online database of all the computers available in stock. You can access and query this online database using our online SQL Editor:
Open in new windowAccess Online Database / SQL Editor
Your job is to:
- Pick a customer and read through their requirements (see tabs below),
- Write an SQL query to interrogate the database to identify the computer that meets their requirements,
- Repeat this process for each customer.
Note that each one of your query should return one and only one computer that fully satisfies the customer’s demands.
Here are some examples of SQL queries based on the computers table:
SELECT * FROM computers WHERE type="Laptop" AND touchscreen=TRUE AND screenSize>=15;
SELECT * FROM computers WHERE type="Desktop" AND (HDD>1000 OR SSD>1000);
SELECT * FROM computers WHERE type="Laptop" AND RAM>=8 AND operatingSystem="Windows" AND (price>=300 AND price<=400);

SQL Query:
Recommended Computer:

SQL Query:
Recommended Computer:

SQL Query:
Recommended Computer:

SQL Query:
Recommended Computer:

SQL Query:
Recommended Computer:
Extension Tasks:
Warning: When completing the following extension tasks, note that, on this online system, Boolean values are actually stored as string containing the values “TRUE” and “FALSE”. This means that, in your queries, you will need to use “speechmarks” when storing the values “TRUE” and “FALSE” as string instead of Boolean values.
SQL Query:
Name | Notebook NB-450 |
Type | Laptop |
Number of Cores | 4 (Quad Core) |
Clock Speed | 3.5GHz |
RAM | 16GB |
Hard Disk Drive | 1TB |
Solid State Drive | 256GB |
Screen Size | 16 |
Touchscreen | ✓ |
Operating System | MacOS |
Price | £550 |
Warning: In this computers table the ID field is not set as an AUTO_INCREMENT field. Which means that you will have to provide a value for the ID field within your INSERT query.
SQL Query:
SQL Query:
SQL Query:

Solution...
The solution for this challenge is available to full members!Find out how to become a member:
➤ Members' Area