Homework 8 Problem 3
<your name should appear here>
************
problem 3-2
MOVIE
-----
10001
10002
10003
30001
30002
30003
6 rows selected.
************
problem 3-3
MOVIE_TITLE
----------------------------------------
Babe
Gone with the Wind
It's a Wonderful Life
The Muppet Movie
Toy Story
Toy Story 2
6 rows selected.
************
problem 3-4
MOVIE_TITLE
----------------------------------------
All About Eve
Babe
Clockwork Orange
Fatal Attraction
Indiana Jones and the Last Crusade
Midnight Cowboy
Return of the Jedi
The Blues Brothers
The Matrix
The Philadelphia Story
10 rows selected.
************
problem 3-5
VID_ID VID_RENTAL_PRICE
------ ----------------
230064 5.99
230073 5.99
230074 5.99
330033 5.99
330034 5.99
230043 3.99
230052 3.99
330012 3.99
220061 2.99
220063 2.99
220071 2.99
VID_ID VID_RENTAL_PRICE
------ ----------------
220072 2.99
320031 2.99
220021 2.19
420021 2.19
420031 2.19
420042 2.19
120021 1.99
120041 1.99
120051 1.99
130061 1.99
220032 1.99
VID_ID VID_RENTAL_PRICE
------ ----------------
220042 1.99
220051 1.99
320011 1.99
320021 1.99
320022 1.99
210041 1.29
410041 1.29
210011 .99
210031 .99
31 rows selected.
************
problem 3-6
CLIE
----
4444
9999
************
problem 3-7
VID_ID NUM_RENTALS
------ -----------
120011 4
130012 3
130031 3
210011 2
210031 2
130022 1
210041 1
220013 1
220062 1
230012 1
230033 1
VID_ID NUM_RENTALS
------ -----------
320032 1
330023 1
420011 1
120021 0
120041 0
120051 0
130061 0
220021 0
220032 0
220042 0
220051 0
VID_ID NUM_RENTALS
------ -----------
220061 0
220063 0
220071 0
220072 0
230043 0
230052 0
230064 0
230073 0
230074 0
320011 0
320021 0
VID_ID NUM_RENTALS
------ -----------
320022 0
320031 0
330012 0
330033 0
330034 0
410041 0
420021 0
420031 0
420042 0
42 rows selected.
************
problem 3-8
Commit complete.
CLIENT_LNAME CLIENT_CREDIT_RTG
--------------- -----------------
Alpha 4.9
Beta 1.2
Carlos 3.8
Delta 3.4
Beta 5
Epsilon 2.1
Feta 0
Greta 4.4
Harpo 3.3
9 rows selected.
1 row updated.
CLIENT_LNAME CLIENT_CREDIT_RTG
--------------- -----------------
Alpha 4.9
Beta 1.2
Carlos 3.8
Delta 3.8
Beta 5
Epsilon 2.1
Feta 0
Greta 4.4
Harpo 3.3
9 rows selected.
************
problem 3-9
VID_ID VID_RENTAL_PRICE
------ ----------------
120011 2.99
120021 1.99
210011 .99
220013 2.19
220021 2.19
320011 1.99
320021 1.99
320022 1.99
320031 2.99
320032 2.99
210031 .99
VID_ID VID_RENTAL_PRICE
------ ----------------
220032 1.99
210041 1.29
220042 1.99
220051 1.99
220061 2.99
220062 2.99
220063 2.99
420011 2.19
420021 2.19
420031 2.19
120041 1.99
VID_ID VID_RENTAL_PRICE
------ ----------------
120051 1.99
410041 1.29
420042 2.19
220071 2.99
220072 2.99
27 rows selected.
27 rows updated.
VID_ID VID_RENTAL_PRICE
------ ----------------
120011 2.45
120021 1.63
210011 .81
220013 1.8
220021 1.8
320011 1.63
320021 1.63
320022 1.63
320031 2.45
320032 2.45
210031 .81
VID_ID VID_RENTAL_PRICE
------ ----------------
220032 1.63
210041 1.06
220042 1.63
220051 1.63
220061 2.45
220062 2.45
220063 2.45
420011 1.8
420021 1.8
420031 1.8
120041 1.63
VID_ID VID_RENTAL_PRICE
------ ----------------
120051 1.63
410041 1.06
420042 1.8
220071 2.45
220072 2.45
27 rows selected.
************
problem 3-10
RENTAL_ CLIE VID_ID DATE_OUT DATE_DUE DATE_RETU
------- ---- ------ --------- --------- ---------
0000018 1111 220062 21-SEP-16 26-SEP-16
0000008 1111 130022 04-SEP-16 07-SEP-16 14-SEP-16
0000016 2222 330023 11-SEP-16 16-SEP-16 15-SEP-16
0000002 2222 130031 19-SEP-16 22-SEP-16
0000003 2222 130012 03-SEP-16 08-SEP-16 04-SEP-16
0000007 3333 120011 15-SEP-16 18-SEP-16 21-SEP-16
0000015 3333 420011 01-SEP-16 04-SEP-16 03-SEP-16
0000004 3333 130012 21-SEP-16 22-SEP-16
0000019 3333 320032 06-SEP-16 09-SEP-16 07-SEP-16
0000005 3333 210011 08-AUG-16 11-AUG-16
0000023 4444 120011 16-SEP-16 18-SEP-16 21-SEP-16
RENTAL_ CLIE VID_ID DATE_OUT DATE_DUE DATE_RETU
------- ---- ------ --------- --------- ---------
0000022 5555 210031 16-SEP-16 18-SEP-16 17-SEP-16
0000001 5555 120011 21-SEP-16 23-SEP-16 22-SEP-16
0000017 5555 220013 22-SEP-16 25-SEP-16
0000009 6666 130012 13-SEP-16 16-SEP-16 16-SEP-16
0000021 6666 210011 15-SEP-16 17-SEP-16
0000020 7777 130031 29-AUG-16 01-SEP-16 02-SEP-16
0000024 7777 130031 08-SEP-16 10-SEP-16 09-SEP-16
0000010 7777 120011 14-SEP-16 17-SEP-16 17-SEP-16
0000011 8888 230012 05-SEP-16 10-SEP-16
0000012 9999 210031 10-SEP-16 13-SEP-16 13-SEP-16
0000014 9999 230033 10-SEP-16 13-SEP-16 13-SEP-16
RENTAL_ CLIE VID_ID DATE_OUT DATE_DUE DATE_RETU
------- ---- ------ --------- --------- ---------
0000013 9999 210041 10-SEP-16 13-SEP-16 13-SEP-16
23 rows selected.
5 rows deleted.
RENTAL_ CLIE VID_ID DATE_OUT DATE_DUE DATE_RETU
------- ---- ------ --------- --------- ---------
0000018 1111 220062 21-SEP-16 26-SEP-16
0000008 1111 130022 04-SEP-16 07-SEP-16 14-SEP-16
0000002 2222 130031 19-SEP-16 22-SEP-16
0000003 2222 130012 03-SEP-16 08-SEP-16 04-SEP-16
0000016 2222 330023 11-SEP-16 16-SEP-16 15-SEP-16
0000023 4444 120011 16-SEP-16 18-SEP-16 21-SEP-16
0000017 5555 220013 22-SEP-16 25-SEP-16
0000022 5555 210031 16-SEP-16 18-SEP-16 17-SEP-16
0000001 5555 120011 21-SEP-16 23-SEP-16 22-SEP-16
0000009 6666 130012 13-SEP-16 16-SEP-16 16-SEP-16
0000021 6666 210011 15-SEP-16 17-SEP-16
RENTAL_ CLIE VID_ID DATE_OUT DATE_DUE DATE_RETU
------- ---- ------ --------- --------- ---------
0000024 7777 130031 08-SEP-16 10-SEP-16 09-SEP-16
0000010 7777 120011 14-SEP-16 17-SEP-16 17-SEP-16
0000020 7777 130031 29-AUG-16 01-SEP-16 02-SEP-16
0000011 8888 230012 05-SEP-16 10-SEP-16
0000014 9999 230033 10-SEP-16 13-SEP-16 13-SEP-16
0000013 9999 210041 10-SEP-16 13-SEP-16 13-SEP-16
0000012 9999 210031 10-SEP-16 13-SEP-16 13-SEP-16
18 rows selected.
************
problem 3-11
current # videos
----------------
42
30 rows deleted.
VID_ID VID_FOR VID_PURCH VID_RENTAL_PRICE MOVIE
------ ------- --------- ---------------- -----
120011 Blu-Ray 11-JAN-10 2.45 10001
130012 DVD 22-FEB-11 4.99 10001
130022 DVD 04-MAR-12 5.99 10002
130031 DVD 22-FEB-11 4.99 10003
210011 HD-DVD 05-MAY-09 .81 20001
210031 HD-DVD 05-MAY-08 .81 20003
210041 HD-DVD 05-MAY-08 1.06 20004
220013 Blu-Ray 05-APR-08 1.8 20001
220062 Blu-Ray 01-DEC-11 2.45 20006
230012 DVD 01-JAN-10 3.99 20001
230033 DVD 17-AUG-10 3.99 20003
VID_ID VID_FOR VID_PURCH VID_RENTAL_PRICE MOVIE
------ ------- --------- ---------------- -----
330023 DVD 07-JUN-09 4.99 30002
12 rows selected.
Rollback complete.
************
problem 3-12
View dropped.
View created.
MOVIE MOVIE_TITLE MOVIE
----- ---------------------------------------- -----
20002 Indiana Jones and the Last Crusade PG-13
20001 Indiana Jones and the Temple of Doom PG
20005 Return of the Jedi PG
20003 Star Wars PG
20004 The Empire Strikes Back PG
20007 The Matrix R
20006 The Phantom Menace PG
7 rows selected.
************
problem 3-13
View dropped.
View created.
CATEGORY_N MOVIE MOVIE_TITLE
---------- ----- ----------------------------------------
Drama A Clockwork Orange
Drama A Midnight Cowboy
Classic G All About Eve
Family G Babe
Classic G Gone with the Wind
Classic G It's a Wonderful Life
Family G The Muppet Movie
Classic G The Philadelphia Story
Family G Toy Story
Family G Toy Story 2
Action PG Indiana Jones and the Temple of Doom
CATEGORY_N MOVIE MOVIE_TITLE
---------- ----- ----------------------------------------
Action PG Return of the Jedi
Action PG Star Wars
Action PG The Empire Strikes Back
Action PG The Phantom Menace
Action PG-13 Indiana Jones and the Last Crusade
Drama R Fatal Attraction
Drama R One Flew Over the Cuckoo's Nest
Comedy R The Blues Brothers
Action R The Matrix
20 rows selected.
************
problem 3-14
(note: your table will be different, of course...)
Table dropped.
Table created.
(...and you choose where *your* sequence starts...)
Sequence dropped.
Sequence created.
************
problem 3-15
(...and you will have different rows in your different table...)
1 row created.
1 row created.
1 row created.
BOOK_NUM BOOK_TITLE BOOK_CATEGO BOOK_QUANTITY
---------- ------------------------------- ----------- -------------
1001 Little Women Fiction 10
1002 Good Eats Cooking 1
1003 Madame Curie Non-Fiction 7