-
-
Save prodevo/ef55bbc021cb6fa2d0690445a47ac3cd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
USE Store | |
SELECT Product.name AS Product_name, Producer.name AS Producer_name | |
FROM Producer | |
LEFT JOIN Product | |
ON Producer.id = Product.id_producer |
This file contains hidden or 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
USE Store | |
SELECT Category.name AS category, Product.name | |
FROM Category | |
LEFT JOIN Product | |
ON Category.id = Product.id_category | |
WHERE Product.id_category IS NULL |
This file contains hidden or 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
USE Store | |
SELECT Delivery.date_of_delivery AS date_of_delivery, Product.name, Supplier.name | |
FROM Supplier | |
LEFT JOIN Delivery | |
ON Supplier.id = Delivery.id_supplier | |
LEFT JOIN Product | |
ON Product.id = Delivery.id_product |
This file contains hidden or 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
USE Store | |
SELECT Region.name AS Region, Producer.name AS Producer | |
FROM Region | |
LEFT JOIN City | |
ON Region.id = City.id_region | |
LEFT JOIN Address | |
ON City.id = Address.id_city | |
LEFT JOIN Producer | |
ON Address.id = Producer.id_address | |
This file contains hidden or 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
USE Store | |
SELECT Category.name AS category, Producer.name AS Producer | |
FROM Category | |
LEFT JOIN Product | |
ON Category.id = Product.id_producer | |
LEFT JOIN Producer | |
ON Product.id_category = Producer.id | |
WHERE Producer.name != 'КОМО' |
This file contains hidden or 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
USE Store | |
SELECT Category.name AS category, Producer.name AS Producer | |
FROM Category | |
LEFT JOIN Product | |
ON Category.id = Product.id_producer | |
LEFT JOIN Producer | |
ON Product.id_category = Producer.id | |
WHERE Category.name != 'Масло' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment