-- Oefening 1
SELECT cust_name, cust_contact, cust_email
FROM Customers
WHERE cust_state IN ('IL', 'IN', 'MI');
-- Oefening 2
SELECT cust_name, cust_contact, cust_email
FROM Customers
WHERE cust_name = 'Fun4All';
-- Oefening 3
SELECT cust_name, cust_contact, cust_email
FROM Customers
WHERE cust_state IN ('IL', 'IN', 'MI')
UNION
SELECT cust_name, cust_contact, cust_email
FROM Customers
WHERE cust_name = 'Fun4All';
Download hier het bestand.
-- Opdracht 1 /* Combineer de tabellen Vendors en Products en toon alle unieke vend_id. */ -- vend_id -- BRE02 -- BRS01 -- DLL01 -- FNG01 -- FRB01 -- JTS01 SELECT -- Opdracht 2 /* Combineer de tabellen Vendors en Products en toon de vend_id die in beiden tabellen voorkomen. */ -- vend_id -- BRS01 -- DLL01 -- FNG01 SELECT -- Opdracht 3 /* Combineer de tabellen Vendors en Products en toon de vend_id die wel voorkomt in Vendors en niet in Products. */ -- vend_id -- BRE02 -- FRB01 -- JTS01 SELECT -- Opdracht 4 /* Combineer de tabellen Vendors en Customers en toon het land dat in beiden tabellen voorkomt. */ -- vend_country -- USA SELECT
Download hier het bestand.
-- Opdracht 1 /* Combineer de tabellen Vendors en Products en toon alle unieke vend_id. */ -- vend_id -- BRE02 -- BRS01 -- DLL01 -- FNG01 -- FRB01 -- JTS01 SELECT vend_id FROM Vendors UNION SELECT vend_id FROM Products; -- Opdracht 2 /* Combineer de tabellen Vendors en Products en toon de vend_id die in beiden tabellen voorkomen. */ -- vend_id -- BRS01 -- DLL01 -- FNG01 SELECT vend_id FROM Vendors INTERSECT SELECT vend_id FROM Products; -- Opdracht 3 /* Combineer de tabellen Vendors en Products en toon de vend_id die wel voorkomt in Vendors en niet in Products. */ -- vend_id -- BRE02 -- FRB01 -- JTS01 SELECT vend_id FROM Vendors EXCEPT SELECT vend_id FROM Products; -- Opdracht 4 /* Combineer de tabellen Vendors en Customers en toon het land dat in beiden tabellen voorkomt. */ -- vend_country -- USA SELECT vend_country FROM Vendors INTERSECT SELECT cust_country FROM Customers;
Download hier het bestand.
