1.
Number and name of all customers
SELECT CustomerNum, CustomerName
FROM Customer;
CustomerNum CustomerName
126 Toys Galore
260 Brookings Direct
334 The Everything Shop
386 Johnson's Department Store
440 Grove Historical Museum Store
502 Cards and More
586 Almondton General Store
665 Cricket Gift Shop
713 Cress Store
796 Unique Gifts
824 Kline's
893 All Season Gifts
2. Complete item table
SELECT *
FROM Item;
ItemNum Description OnHand Category Storehouse Price
AH74 Patience 9 GME 3 $22.99
BR23 Skittles 21 GME 2 $29.99
CD33 Wood Block Set (48 piece) 36 TOY 1 $89.49
DL51 Classic Railway Set 12 TOY 3 $107.95
DR67 Giant Star Brain Teaser 24 PZL 2 $31.95
DW23 Mancala 40 GME 3 $50.00
FD11 Rocking Horse 8 TOY 3 $124.95
FH24 Puzzle Gift Set 65 PZL 1 $38.95
KA12 Cribbage Set 56 GME 3 $75.00
KD34 Pentominoes Brain Teaser 60 PZL 2 $14.95
KL78 Pick Up Sticks 110 GME 1 $10.95
MT03 Zauberkasten Brain Teaser 45 PZL 1 $45.79
NL89 Wood Block Set (62 piece) 32 TOY 3 $119.75
TR40 Tic Tac Toe 75 GME 2 $13.99
TW35 Fire Engine 30 TOY 2 $118.95
3. Number and name of every customer represented by Rep 15
SELECT CustomerNum, CustomerName, RepNum
FROM Customer
WHERE RepNum='15';
CustomerNum CustomerName RepNum
126 Toys Galore 15
502 Cards and More 15
713 Cress Store 15
893 All Season Gifts 15
4. Number and name of all customers represented by Rep 15 and have credit limit of
$10,000
SELECT CustomerNum, CustomerName, RepNum, CreditLimit
FROM Customer
WHERE RepNum='15'
AND CreditLimit=10000;
CustomerNum CustomerName RepNum CreditLimit
713 Cress Store 15 $10,000.00
5. Number and name of all customers represented by Rep 15 or have credit limit of
$10,000
SELECT CustomerNum, CustomerName, RepNum, CreditLimit
FROM Customer
WHERE RepNum='15'
OR CreditLimit=10000;
CustomerNum CustomerName RepNum CreditLimit
126 Toys Galore 15 $7,500.00
260 Brookings Direct 30 $10,000.00
502 Cards and More 15 $5,000.00
713 Cress Store 15 $10,000.00
893 All Season Gifts 15 $7,500.00
6. Number and name of all customers represented by Megan Gradey
SELECT CustomerNum, CustomerName, RepNum
FROM Customer
WHERE RepNum='30';
CustomerNum CustomerName RepNum
260 Brookings Direct 30
386 Johnson's Department Store 30
665 Cricket Gift Shop 30
824 Kline's 30
7. Columns and rows in item table. Results sorted by item description in ascending
order
SELECT *
FROM Item
ORDER BY Description;
ItemNum Description OnHand Category Storehouse Price
DL51 Classic Railway Set 12 TOY 3 $107.95
KA12 Cribbage Set 56 GME 3 $75.00
TW35 Fire Engine 30 TOY 2 $118.95
DR67 Giant Star Brain Teaser 24 PZL 2 $31.95
DW23 Mancala 40 GME 3 $50.00
AH74 Patience 9 GME 3 $22.99
KD34 Pentominoes Brain Teaser 60 PZL 2 $14.95
KL78 Pick Up Sticks 110 GME 1 $10.95
FH24 Puzzle Gift Set 65 PZL 1 $38.95
FD11 Rocking Horse 8 TOY 3 $124.95
BR23 Skittles 21 GME 2 $29.99
TR40 Tic Tac Toe 75 GME 2 $13.99
CD33 Wood Block Set (48 piece) 36 TOY 1 $89.49
NL89 Wood Block Set (62 piece) 32 TOY 3 $119.75
MT03 Zauberkasten Brain Teaser 45 PZL 1 $45.79