Below 1.0 F 2.ÿÿÿÿTry creating another student with the id 1 (the same as Sally’s). a.ÿÿÿÿScreenshot the results of the following query and insert it into your homework WORD document:insertÿÿintoÿÿstudentÿÿvaluesÿÿ(‘1′,ÿ’Bob’,ÿ’Smith’,ÿ’14 King Blvd.’,ÿ’NY’,ÿ’3.17′,ÿ’124′);b.ÿÿÿÿHow does MySQL respond? Explain what the message displayed means.ÿÿÿ3.ÿÿÿÿÿUse the following SQL query to retrieve all records. Take a screenshot and insert it into your homework WORD document:selectÿÿ*ÿÿfrom student;4.ÿÿÿÿScreenshot the results of the following query and insert it into your homework WORD document:selectÿÿgpa, lastname, stateÿÿfromÿÿstudentÿÿwhereÿÿstate=’RI’;The query shows 3 columns for the gpa, lastname and state fields and it only displays students from RI.5.ÿÿÿÿNext, write and run (issue) SQL queries that do the following. For each query, provide screenshots for the SQL query and the results within a Word document so I can grade it.a.ÿÿÿÿShow all students with the last name Jonsey.b.ÿÿÿÿRetrieve all student names (first and last) with a B GPA (see table for definition in first question)and are NOT from NJ.c.ÿÿÿÿRetrieve all students that are NOT in honors (see table for definition in first question)d.ÿÿÿÿRetrieve lastname, gpa, and credits of all DE and RI freshman (see table for definition in first question). Order the results by last name.e.ÿÿÿÿDisplay the query and the results to determine if there are any students from NJ with High Honors.f.ÿÿÿÿÿRetrieve the last names and credits of all students that are NOT from NJ, RI or DE. Order by the state.6.ÿÿÿÿSubmit your homework to Moodle. The Word document must have your lastname as part of the filename.EXTRA CREDIT:ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿFor each problem, show the SQL query and a screenshot of the results:1.ÿÿÿÿHow many students are from RI?2.ÿÿÿÿRetrieve just a list of Student IDs along with their credit information for all students that do NOT have the lastname “Jonsey” and are honors students. Sort by gpa.REMARKS:Feel free to use either the command-line interface or the Web-based interface for this lab assignment. úÿÿÿÿÿÿAs an alternative to using the command-line interface, feel free to use MySQL’s Web-based interface for this exercise ( insert two or three more students via the command-line and try the insert command for Bob Campbell above).ÿThis interface can be accessed via the following URL:http://web.njit.edu/mysql/phpMyAdminAfter logging in, select your table student, shown on the left-hand side, and then choose the “insert” tab.ÿFrom there, it should be straightforward.úÿÿÿÿÿÿThe command-line interface allows for the direct execution of SQL queries stored in a file on your AFS account.ÿÿFor example, assume you have written and saved a query in a file called query.txt.ÿÿTo run the query, type the following command (when logged in via the command-line interface):sourceÿÿquery.txt;Note that query.txt can contain multiple queries, one per line.ÿThey will be run in order.

Leave a Reply

Your email address will not be published.