title: sep 159:36 am (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardf16/cis150/c150se… ·...

40
Note the use of dual for testing functions using a literal. Title: Sep 159:36 AM (1 of 40)

Upload: others

Post on 15-Jul-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Note the use of dual for testing functions using a literal.

Title: Sep 15­9:36 AM (1 of 40)

Page 2: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:38 AM (2 of 40)

Page 3: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:40 AM (3 of 40)

Page 4: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:40 AM (4 of 40)

Page 5: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:41 AM (5 of 40)

Page 6: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

SUBSTR is a very useful function as is INSTR

SUBSTR(field, start, numberCharacters) will find the start point and take the number of charactersSUBSTR(field, start) will find the start point and take the characters until the end.

Title: Sep 15­9:43 AM (6 of 40)

Page 7: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:45 AM (7 of 40)

Page 8: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:45 AM (8 of 40)

Page 9: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:46 AM (9 of 40)

Page 10: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:47 AM (10 of 40)

Page 11: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:48 AM (11 of 40)

Page 12: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:48 AM (12 of 40)

Page 13: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:49 AM (13 of 40)

Page 14: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:50 AM (14 of 40)

Page 15: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:50 AM (15 of 40)

Page 16: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:51 AM (16 of 40)

Page 17: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:51 AM (17 of 40)

Page 18: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:52 AM (18 of 40)

Page 19: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:53 AM (19 of 40)

Page 20: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

NVL replaces null values with other data for the duration of the query.

Title: Sep 15­9:55 AM (20 of 40)

Page 21: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­9:58 AM (21 of 40)

Page 22: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:02 AM (22 of 40)

Page 23: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:03 AM (23 of 40)

Page 24: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:10 AM (24 of 40)

Page 25: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:17 AM (25 of 40)

Page 26: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:18 AM (26 of 40)

Page 27: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:21 AM (27 of 40)

Page 28: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:22 AM (28 of 40)

Page 29: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Group by state, contact means you are grouping by contact within state.State is the major thing.

Title: Sep 15­10:23 AM (29 of 40)

Page 30: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:23 AM (30 of 40)

Page 31: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:24 AM (31 of 40)

Page 32: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:28 AM (32 of 40)

Page 33: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Can't ask about sum with the where clause because that relates to eliminating groups.  Need todo that with the having clause.

Title: Sep 15­10:29 AM (33 of 40)

Page 34: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:29 AM (34 of 40)

Page 35: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:30 AM (35 of 40)

Page 36: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:33 AM (36 of 40)

Page 37: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:35 AM (37 of 40)

Page 38: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:39 AM (38 of 40)

Page 39: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:41 AM (39 of 40)

Page 40: Title: Sep 159:36 AM (1 of 40)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF16/CIS150/c150Se… · Title: Sep 1510:23 AM (29 of 40) Title: Sep 1510:23 AM (30 of 40) Title: Sep 1510:24

Title: Sep 15­10:43 AM (40 of 40)