sqlh2.3

01-- Opdracht 1 | Vendors
02 
03/* Toon alle vend_name. */
04 
05-- vend_name
06-- Bear Emporium
07-- Bears R Us
08-- Doll House Inc.
09-- Fun and Games
10-- Furball Inc.
11-- Jouets et ours
12 
13SELECT vend_name
14FROM Vendors;
15 
16-- Opdracht 2 | Vendors
17 
18/* Toon de vend_name, vend_city en vend_country. */
19 
20-- vend_name        vend_city   vend_country
21-- Bear Emporium    Anytown     USA
22-- Bears R Us       Bear Town   USA
23-- Doll House Inc.  Dollsville  USA
24-- Fun and Games    London      England
25-- Furball Inc. New York        USA
26-- Jouets et ours   Paris       France
27 
28SELECT vend_name, vend_city, vend_country
29FROM Vendors;
30 
31-- Opdracht 3 | Customers
32 
33/* Toon alle customers. */
34 
35-- cust_id      cust_name       cust_address            cust_city   cust_state  cust_zip    cust_country        cust_contact    cust_email
36-- 1000000001   Village Toys    200 Maple Lane          Detroit     MI  44444   USA         John Smith          sales@villagetoys.com
37-- 1000000002   Kids Place      333 South Lake Drive    Columbus    OH  43333   USA         Michelle Green      NULL
38-- 1000000003   Fun4All         1 Sunny Place           Muncie      IN  42222   USA         Jim Jones           jjones@fun4all.com
39-- 1000000004   Fun4All         829 Riverside Drive     Phoenix     AZ  88888   USA         Denise L. Stephens  dstephens@fun4all.com
40-- 1000000005   The Toy Store   4545 53rd Street        Chicago     IL  54545   USA         Kim Howard          NULL
41 
42SELECT *
43FROM Customers;
44 
45-- Opdracht 4 | Products
46 
47/* Toon de eerste twee unieke vend_id. */
48 
49-- vend_id
50-- BRS01
51-- DLL01
52 
53SELECT DISTINCT TOP 2 vend_id
54FROM Products;
55 
56-- MySQL
57SELECT DISTINCT vend_id
58FROM Products
59LIMIT 2;

Download hier het bestand.