 
 INSERT INTO Type (Name) VALUES ('СЫР'), ('МОЛОКО'), ('МОРОЖЕНОЕ');
 
-INSERT INTO Product (name, type_id, expired_date, price, quantity) VALUES 
+INSERT INTO Product (name, type_id, expired_date, price, quantity) VALUES
 ('Сыр', 1, '2019-09-23', 100, 6),
 ('Сыр2', 1, '2019-10-10', 150, 15),
 ('Сыр3', 1, '2019-12-11', 250, 0),

SELECT * FROM Product pr WHERE pr.expired_date BETWEEN '2019-09-01' AND '2019-09-30';

--4
SELECT * FROM Product pOne 
INNER JOIN 
(
	SELECT MAX(pr.price) AS price
	FROM Product pr
) 
	pTwo ON pOne.price=pTwo.price;
	
--5
--выводит все продукты типа сыр
SELECT * FROM Product WHERE type_id=1;

--6
--выводит все продукты типа сыр и молоко
SELECT * FROM Product WHERE type_id=1 OR type_id=2;

--7
SELECT * FROM Product WHERE quantity < 10;

--8
SELECT * FROM Product pr INNER JOIN Type ty ON pr.type_id=ty.id;
('Мороженое', 3, '2019-09-12', 240, 3),
('Мороженое', 3, '2019-12-24', 140, 3);

---1
SELECT p.*
FROM Product p, Type t
WHERE t.name='СЫР' AND t.id=p.type_id;

--2
SELECT * FROM Product pr WHERE pr.name LIKE '%Мороженое%';
