Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using the contents of the CHARTER table, write the SQL code that will produce the output shown in Figure 2. Note that the output is
Using the contents of the CHARTER table, write the SQL code that will produce the output shown in Figure 2. Note that the output is limited to selected attributes for aircraft number 2778V.
Table name: CUSTOMER CUS_CODE CUS LNAME CUS FNAME 10010 Ramas Alfred 10011 Dunne Leona 10012 Smith Kathy 10013 Olowski Paul 10014 Orlando Myron 10015 O'Brian Amy 10016 Brown James 10017 Williams George 10018 Farriss Anne 10019 Smith Olette CUS_INITIAL CUS_AREACODE CUS_PHONE A 0181 844-2573 0161 894-1238 w 0181 894-2285 F 0181 894-2180 0181 222-1672 B 0161 442-3381 G 0181 297-1228 290-2556 G 0161 382-7185 K 0181 297-3809 CUS BALANCE 0.00 0.00 896.54 1285.19 673.21 1014.56 0.00 0.00 0181 0.00 453.98 CUS_CODE Table name: CHARTER CHAR_TRIP CHAR_DATE AC_NUMBER CHAR_DES CHAR_DIST CHAR_DIST CHAR_HOU CHAR_HOU CHAR_FUEL TINATION ANCE RS_FLOWN RS_WAIT GALLONS 10001 05-Feb-13 2289L ATL 936.00 5.1 22 354.1 10002 05-Feb-132778V BNA 320.00 1.6 0 72.6 10003 05-Feb-134278Y GNV 1,574.00 7.8 0 339.8 10004 06-Feb-13 1484P STL 472.00 2.9 4.9 972 10005 06-Feb-13 2289L ATL 1,023.00 5.7 3.5 397.7 10006 06-Feb-13 4278Y STL 472.00 2.6 5.2. 117.1 10007 06-Feb-132778V GNV 1,574.00 7.9 0 348.4 10008 07-Feb-13 1484P TYS 644.00 0 140.6 10009 07-Feb-13 2289L GNV 1,574.00 6.6 23.4 459.9 10010 07-Feb-13 4278Y ATL 998.00 6.2 3.2 279.7 10011 07-Feb-131484P BNA 352.00 1.9 5.3 66.4 10012 08-Feb-13 2778V MOB 884.00 4.8 215.1 10013 08-Feb-13 4278Y TYS 644.00 3.9 4.5 174.3 10014 09-Feb-134278Y ATL 936.00 6.1 2.1 302.6 10015 09-Feb-13 2289L GNV 1.645.00 6.7 0 459.5 10016 09-Feb-132778V 312.00 0 67.2 10017 10-Feb-13 1484P STL 508.00 3.1 0 105.5 10018 10-Feb-13 4278Y TYS 644.00 3.8 4.5 167.4 4.1 CHAR OIL QT s 1 0 2 1 2 0 2 1 0 0 1 0 1 0 2 0 0 0 10011 10016 10014 10019 10011 10017 10012 10014 10017 10016 10012 10010 10011 10017 10016 10011 10014 10017 42 1.5 Figure 1 Database Structure and Contents CHAR_DATE AC_NUMBER CHAR_DESTINATION CHAR DISTANCE 05-Feb-13 2778V BNA 320.00 06-Feb-132778V GNV 1574.00 08-Feb-13 2778V MOB 884.00 09-Feb-13 | 2778V MQY 312.00 Figure 2 Question B Query Result CHAR_HOURS FLOWN 1.60 7.90 4.80 1.50 CHAR_DATE AC_NUMBER 08-Feb-13 2778V 09-Feb-13 2778V 06-Feb-132778V 05-Feb-13 2778V CHAR_DESTINATION MOB GNV BNA CUS LNAME CUS AREACODE CUS PHONE Ramas 0181 844-2573 Dunne 0161 894-1238 Smith 0181 894-2285 Brown 0181 297-1228 Figure 3 Question C Query Result CHAR_DATE 05-Feb-13 06-Feb-13 08-Feb-13 09-Feb-13 AC_NUMBER CHAR_DESTINATION CHAR_DISTANCE 2778V BNA 320.00 2778V GNV 1574.00 2778V MOB 884.00 2778V MQY 312.00 Figure 2 Question B Query Result CHAR_HOURS FLOWN 1.60 7.90 4.80 1.50 Table name: CUSTOMER CUS_CODE CUS LNAME CUS FNAME 10010 Ramas Alfred 10011 Dunne Leona 10012 Smith Kathy 10013 Olowski Paul 10014 Orlando Myron 10015 O'Brian Amy 10016 Brown James 10017 Williams George 10018 Farriss Anne 10019 Smith Olette CUS_INITIAL CUS_AREACODE CUS_PHONE A 0181 844-2573 0161 894-1238 w 0181 894-2285 F 0181 894-2180 0181 222-1672 B 0161 442-3381 G 0181 297-1228 290-2556 G 0161 382-7185 K 0181 297-3809 CUS BALANCE 0.00 0.00 896.54 1285.19 673.21 1014.56 0.00 0.00 0181 0.00 453.98 CUS_CODE Table name: CHARTER CHAR_TRIP CHAR_DATE AC_NUMBER CHAR_DES CHAR_DIST CHAR_DIST CHAR_HOU CHAR_HOU CHAR_FUEL TINATION ANCE RS_FLOWN RS_WAIT GALLONS 10001 05-Feb-13 2289L ATL 936.00 5.1 22 354.1 10002 05-Feb-132778V BNA 320.00 1.6 0 72.6 10003 05-Feb-134278Y GNV 1,574.00 7.8 0 339.8 10004 06-Feb-13 1484P STL 472.00 2.9 4.9 972 10005 06-Feb-13 2289L ATL 1,023.00 5.7 3.5 397.7 10006 06-Feb-13 4278Y STL 472.00 2.6 5.2. 117.1 10007 06-Feb-132778V GNV 1,574.00 7.9 0 348.4 10008 07-Feb-13 1484P TYS 644.00 0 140.6 10009 07-Feb-13 2289L GNV 1,574.00 6.6 23.4 459.9 10010 07-Feb-13 4278Y ATL 998.00 6.2 3.2 279.7 10011 07-Feb-131484P BNA 352.00 1.9 5.3 66.4 10012 08-Feb-13 2778V MOB 884.00 4.8 215.1 10013 08-Feb-13 4278Y TYS 644.00 3.9 4.5 174.3 10014 09-Feb-134278Y ATL 936.00 6.1 2.1 302.6 10015 09-Feb-13 2289L GNV 1.645.00 6.7 0 459.5 10016 09-Feb-132778V 312.00 0 67.2 10017 10-Feb-13 1484P STL 508.00 3.1 0 105.5 10018 10-Feb-13 4278Y TYS 644.00 3.8 4.5 167.4 4.1 CHAR OIL QT s 1 0 2 1 2 0 2 1 0 0 1 0 1 0 2 0 0 0 10011 10016 10014 10019 10011 10017 10012 10014 10017 10016 10012 10010 10011 10017 10016 10011 10014 10017 42 1.5 Figure 1 Database Structure and Contents CHAR_DATE AC_NUMBER CHAR_DESTINATION CHAR DISTANCE 05-Feb-13 2778V BNA 320.00 06-Feb-132778V GNV 1574.00 08-Feb-13 2778V MOB 884.00 09-Feb-13 | 2778V MQY 312.00 Figure 2 Question B Query Result CHAR_HOURS FLOWN 1.60 7.90 4.80 1.50 CHAR_DATE AC_NUMBER 08-Feb-13 2778V 09-Feb-13 2778V 06-Feb-132778V 05-Feb-13 2778V CHAR_DESTINATION MOB GNV BNA CUS LNAME CUS AREACODE CUS PHONE Ramas 0181 844-2573 Dunne 0161 894-1238 Smith 0181 894-2285 Brown 0181 297-1228 Figure 3 Question C Query Result CHAR_DATE 05-Feb-13 06-Feb-13 08-Feb-13 09-Feb-13 AC_NUMBER CHAR_DESTINATION CHAR_DISTANCE 2778V BNA 320.00 2778V GNV 1574.00 2778V MOB 884.00 2778V MQY 312.00 Figure 2 Question B Query Result CHAR_HOURS FLOWN 1.60 7.90 4.80 1.50Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started