2023-01-31
Max. 15 points
Name:
Task | Max. | Achieved |
---|---|---|
1 | 6 | |
2 | 9 | |
Sum | 15 |
To solve the tasks in this test, use the following ERD.
-- mariadb solution
select CustomerName as "Customer Name" from Customers c
where c.CustomerID not in
(
select CustomerID from Orders o
);
select distinct(c.CustomerID), c.* from Products p
natural join Orders
natural join OrderDetails
natural join Customers c
where Price >
(
select 2 * avg(Price) from Products
);