Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hands-On Assignments To perform the following assignments, refer to the tables c

ID: 3736359 • Letter: H

Question

Hands-On Assignments To perform the following assignments, refer to the tables created in the JLDB_Build_8.sql script at the beginning of the chapter. Give the SQL statements and output for the following data requests: 1. Which customers live in New Jersey? List each customer's last name, first name, and state 2. Which orders shipped after April 1, 2009? List each order number and the date it shipped 3. Which books aren't in the Fitness category? List each book title and category 4. Which customers live in Georgia or New Jersey? Put the results in ascending order by last name. List each customer's customer number, last name, and state. Write this query in two 5. Which orders were placed on or before April 1, 2009? List each order number and order 6. List all authors whose last name contains the letter pattern "IN." Put the results in order of 7. List all customers who were referred to the bookstore by another customer. List each 8. Display the book title and category for all books in the Children and Cooking categories different ways date. Write this query in two different ways last name, then first name. List each author's last name and first name customer's last name and the number of the customer who made the referral Create three different queries to accomplish this task: a) a search pattern operation, b) a logical operator, and c) another operator not used in a or b fourth letter. List each book's ISBN and title. Sort the list by title in descending order searching for the publish date by using three different methods: a) a range operator, b) a 9. Use a search pattern to find any book title with "A" for the second letter and "N" for the 10. List the title and publish date of any computer book published in 2005. Perform the task of logical operator, and c) a search pattern operation

Explanation / Answer

Answer 3:

select Title, Category from Books where Category<>'Fitness';

----------------------------------------------------------------------------------------

Answer 5:

select Order, OrderDate from Orders where OrderDate <='01-APR-09';

----------------------------------------------------------------------------------------

Answer 6:

select Lname,Fname from Author where Lname like '%IN%' order by Lname,Fname;

-------------------------------------------------------------------------------------

Answer 8(a):

select Title,Category from Books where Category in ('CHILDREN','COOKING');

Answer 8(b):

select Title,Category from Books where Category='CHILDREN' or Category='COOKING';