For this assignment, you will use the provided database in the Unit 5 script file. You...

70.2K

Verified Solution

Question

Advance Math

For this assignment, you will use the provided database in theUnit 5 script file. You will add statements to this file to querythe database tables. For your reference, below is a screenshot ofthe enhanced entity relationship diagram (ERD) as a reference whenyou write your queries. With the data types listed in the diagram,this will help you identify the types of operators that you can usefor particular queries.

Use paiza.io for MySQL to execute and troubleshoot yourStructured Query Language (SQL) statements. It is recommended thatyou use Notepad to write your SQL statements. Then, copy and pasteyour SQL statements to paiza.io to test your statements to ensurethat they execute without errors. Save your work frequently.

The asterisk (*) indicates that a column is not null(i.e., required to have a value).

  1. If you would like to see the test SQL statements, click on“Run” to see the statements execute. You should see “Hello” appearin the Output window (see the following screenshot).
  2. Because you do not require these test SQL statements for yourassignment, delete the sample SQL statements. To do this, selectthe text, and click on the Delete key on your keyboard. Your MySQLpaiza.io screen should now be blank, as you see in the followingscreenshot. Note that if you ran the test statements, “Hello” willstill appear in the Output window.
  3. Copy and paste the code from the provided script file into thecode editor, and click on “Run” (“Ctrl + Enter”). You should see noerror messages displayed in the Output area at the bottom of yourpaiza.io screen. After you click on “Run,” you should see a greenbar with “Success” at the top. You will see this circled in thefollowing screenshot:
  4. Next, you will write 1 query to respond to each of thefollowing questions. Note that you can only use the informationthat is in the question or the enhanced ERD. Write a query to dothe following:
    1. Display all of the rows in the publisher table.
    2. Display all of the books in the book table that were written bythe author whose author ID is 1504192.
    3. Display all of the purchases in the shopbasket that wereordered on 2020-02-29.
    4. Display the largest quantity ordered in the shopbasket.
    5. Display the authors' first and last names sorted by their lastname.
    6. Display a count of the number of orders placed via theshopbasket.
    7. Display the order date and quantity of orders in the shopbasketthat have a quantity of more than 25.
    8. Display the first and last names of those authors who have anull Facebook.
    9. Display all of the customers' names, city, and state if theylive in GA, FL, or CA.
    10. Display the book titles of those books that were not publishedby Scholastic Press.
    11. Display the first and last names of the authors and the booktitles. Only display those authors who wrote a book with the worddatabase in the title.
    12. Add a multiline comment before the first CREATE TABLE statementthat includes your name, the course code (ITCO231), and the datewhen you are submitting your assignment.
  5. Save your script file using your last name, ITCO231, U5, andthe file extension .sql, as in “Smith_ITCO231_U5.sql.”
    1. Tip: When saving a Notepad file, you canchange the file extension to .sql as required for the assignment bychanging the “Save as type” to “All Files” and then typing the .sqlextension, as shown in the example.

I didnt understand by what you mean by SQL TEST. Ifwhat you are asking me is that an SQL TEST? Yes! It is SQL QUERYTEST!!

Answer & Explanation Solved by verified expert
3.7 Ratings (687 Votes)
a Display All of the rows in the Publisher Table SELECT FROM publisher b Display all of the books in the book table that were written by author 1504192 SELECT FROM book WHERE authorid 1504192 c Display all of the purchases in shopbasket that were ordered on 20200229 SELECT FROM shopbasket WHERE orderdate 20200229 d Display Largest Quantity in    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students