Last active
May 30, 2023 09:48
-
-
Save FromMeloriWithLove/035a77316abdc49ad4fbd83c9929f475 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. | |
SELECT Product.name, Delivery.date_of_delivery, Supplier.name | |
FROM Product | |
JOIN Delivery ON Delivery.id = Product.id_producer | |
JOIN Supplier ON Supplier.id = Delivery.id_supplier | |
2. | |
SELECT Region.name | |
FROM Region | |
EXCEPT | |
SELECT Region.name | |
FROM Region | |
WHERE Region.name is NULL | |
3. | |
SELECT Category.name | |
FROM Category | |
EXCEPT | |
SELECT Category.name | |
FROM Category | |
WHERE Category.name LIKE 'Бакалея' | |
4. | |
SELECT name | |
FROM City | |
EXCEPT | |
SELECT ct.name | |
FROM Producer pr JOIN Product p | |
ON pr.id = p.id_producer | |
JOIN Category c ON c.id = p.id_category | |
JOIN Address a ON a.id = pr.id_address | |
JOIN City ct ON ct.id = a.id_city | |
WHERE c.name LIKE 'Молочные' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment