Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the first picture I need #10,11,12 and 13 completed. In the second picture I need #14,15,16,17 and 18 completed. I need these queries in

image text in transcribedimage text in transcribed

In the first picture I need #10,11,12 and 13 completed. In the second picture I need #14,15,16,17 and 18 completed.

I need these queries in SQL view!!!!! Not design or Datasheet view. I do not need the answers just what the query would look like in SQL view.

Thank you!!

er of WHERE conditio conditionen to make a union por 7 How do you all mor sort key? How do you 8. What are the SOL b in functions 7 How 9. What a subquery? When is a suquery execut? TO How do you group data in SOL ? When you group data in SOL, are lo can include in the SELECT clause? Explain TY. How do you join tables in SOL? T2 in a complex jour, how is the number of tables you wish to join related to the number of 13. How do you quality the name of a field in an SQL query? When is it necessary to do som 14. How do you take the union of two tables in SOL? What criteria must the tables meet to me 15. Describe the three update commands in SQL 16. How do you save the results of an SQL query as a table? do you for now is the of a field in a complexity the name wo table the length of the ti d work? Why 010 17. Why is the data type for the ZipCode field CHAR and not SMALLINT OF INTEGER? Is the long enough? Why or why not? 18. You need to delete the Orderline table from the BITS database. Will the following command not? DELETE FROM Ouderline ter 1. (If you wa have the original e a DBMS each step. Cher BITS Corporation Exercises In the following exercises, you will use the data in the BITS database shown in Figure 1-5 in Chapter 1 computer to complete these exercises, use a copy of the original BITS database so you will still have data when you complete Chapter 4.) In each step, use SOL to obtain the desired results. You can use complete the exercises using a computer, or you can simal write the SQL command to complete each with your instructor if you are uncertain about which approach to take. 1. List the number and name of all clients. 2. List the complete Tasks table. 3. List the number and name of every client represented by consultant 22. 4. List the number and name of all clients that are represented by consultar consultant 22 and that have credit lim edit limits $10,000 5. List the number and name of all clients that are represented by consultant 22 or that have credit lima er and name $10,000. 6. For each work order, list the order number, order date, number of the client that placed the order, and the client that placed the order. 7. List the number and name of all clients represented by Sarah Allen. 8. How many clients have a credit limit of $10,000? 9. Find the total of the balances for all clients represented by consultant 35. 10. List the name and remaining credit (CreditLimit-Balance) for each client. 11. List all columns and all rows in the Client table. Sort the results by name. 12. List all columns and all rows in the Tasks table. Sort the results by price within category. 13. For each consultant, list the consultant last name, the average balance of the consultant's clients, and the number of clients assigned to the consultant. Group the records by consultant name, and order the records by consultant name. The Relational Model 2: SOL 129 14. Create a new table named Sept21 to contain QuotedPrice for all rows on which the Scheduled Date is 9/21/2018. ept21 to contain the columns OrderNum. TaskID. Description, ScheduledDate, 15. In the Sept21 table, change the description of TaskID P154 to "Misc. Printing. 16. In the Sept21 table, add a new order. The order number is 69123. The Taskid is 19 nber is 69123. The Taskid is OT99. The scheduled date is 9/21/2018. The quoted price is $99.99. The description is Other work. 17. There are two wave two ways to create the query in Exercise 12. Write the SOL command that you used and then write the alternate command that also would obtain the correct result. 18. How would you modify the query in Exercise to limit retrieval only to work orders that were a 9/10/2018? 17. There ITICAL THINKING ICAL 10. HOWING Colonial Adventure Tours Case The owner of Colonial Adventure Tours knows the importance of the SQL language in database management. He realizes that he can use SQL to perform the same functions that you performed with queries in Chapter 2. In each of the following steps, use SQL to obtain the desired results using the data shown in Figures 1-15 through 1-19 in Chapter 1. (If you use a computer to complete these exercises, use a copy of the Colonial Adventure Tours database, so you will still have the original data when you complete Chapter 4.) You can use a DBMS to complete the exercises using a computer, or you can simply write the SQL command to complete each step. Check with your instructor if you are uncertain about which approach to take. 1. List the name of each trip that does not start in New Hampshire (NH). 2. List the name and start location for each trip that has the type Biking. 3. List the name of each trip that has the type Hiking and that has a distance of greater than six miles. 4. List the name of each trip that has the type Paddling or that is located in Vermont (VT). 5. How many trips have a type of Hiking or Biking? 6. List the trip name, type, and maximum group size for all trips that have Susan Kiley as a guide. 7. List the trip name and state for each trip that occurs during the Summer season. Sort the results by trip name within state. 8. List the name of each trip that has the type Hiking and that is guided by Rita Boyers. 9. How many trips originate in each state? ter than $20 but less than $75? 10. How many reservations include a trip with a pri the number of persons 11. List the reservation ID, customer last name, ar included in the reservation is greater than four mpshire 12. List the trip name, the guide's first name, and Post-it Notes (NH), Sort the results by guide's last name w occur in 13. List the reservation ID, customer number, cu I post-it s mponir Notes are Recyclable www.Post-it.com Post-It Noi E Post-it Post-ik 2018 tots ons er of WHERE conditio conditionen to make a union por 7 How do you all mor sort key? How do you 8. What are the SOL b in functions 7 How 9. What a subquery? When is a suquery execut? TO How do you group data in SOL ? When you group data in SOL, are lo can include in the SELECT clause? Explain TY. How do you join tables in SOL? T2 in a complex jour, how is the number of tables you wish to join related to the number of 13. How do you quality the name of a field in an SQL query? When is it necessary to do som 14. How do you take the union of two tables in SOL? What criteria must the tables meet to me 15. Describe the three update commands in SQL 16. How do you save the results of an SQL query as a table? do you for now is the of a field in a complexity the name wo table the length of the ti d work? Why 010 17. Why is the data type for the ZipCode field CHAR and not SMALLINT OF INTEGER? Is the long enough? Why or why not? 18. You need to delete the Orderline table from the BITS database. Will the following command not? DELETE FROM Ouderline ter 1. (If you wa have the original e a DBMS each step. Cher BITS Corporation Exercises In the following exercises, you will use the data in the BITS database shown in Figure 1-5 in Chapter 1 computer to complete these exercises, use a copy of the original BITS database so you will still have data when you complete Chapter 4.) In each step, use SOL to obtain the desired results. You can use complete the exercises using a computer, or you can simal write the SQL command to complete each with your instructor if you are uncertain about which approach to take. 1. List the number and name of all clients. 2. List the complete Tasks table. 3. List the number and name of every client represented by consultant 22. 4. List the number and name of all clients that are represented by consultar consultant 22 and that have credit lim edit limits $10,000 5. List the number and name of all clients that are represented by consultant 22 or that have credit lima er and name $10,000. 6. For each work order, list the order number, order date, number of the client that placed the order, and the client that placed the order. 7. List the number and name of all clients represented by Sarah Allen. 8. How many clients have a credit limit of $10,000? 9. Find the total of the balances for all clients represented by consultant 35. 10. List the name and remaining credit (CreditLimit-Balance) for each client. 11. List all columns and all rows in the Client table. Sort the results by name. 12. List all columns and all rows in the Tasks table. Sort the results by price within category. 13. For each consultant, list the consultant last name, the average balance of the consultant's clients, and the number of clients assigned to the consultant. Group the records by consultant name, and order the records by consultant name. The Relational Model 2: SOL 129 14. Create a new table named Sept21 to contain QuotedPrice for all rows on which the Scheduled Date is 9/21/2018. ept21 to contain the columns OrderNum. TaskID. Description, ScheduledDate, 15. In the Sept21 table, change the description of TaskID P154 to "Misc. Printing. 16. In the Sept21 table, add a new order. The order number is 69123. The Taskid is 19 nber is 69123. The Taskid is OT99. The scheduled date is 9/21/2018. The quoted price is $99.99. The description is Other work. 17. There are two wave two ways to create the query in Exercise 12. Write the SOL command that you used and then write the alternate command that also would obtain the correct result. 18. How would you modify the query in Exercise to limit retrieval only to work orders that were a 9/10/2018? 17. There ITICAL THINKING ICAL 10. HOWING Colonial Adventure Tours Case The owner of Colonial Adventure Tours knows the importance of the SQL language in database management. He realizes that he can use SQL to perform the same functions that you performed with queries in Chapter 2. In each of the following steps, use SQL to obtain the desired results using the data shown in Figures 1-15 through 1-19 in Chapter 1. (If you use a computer to complete these exercises, use a copy of the Colonial Adventure Tours database, so you will still have the original data when you complete Chapter 4.) You can use a DBMS to complete the exercises using a computer, or you can simply write the SQL command to complete each step. Check with your instructor if you are uncertain about which approach to take. 1. List the name of each trip that does not start in New Hampshire (NH). 2. List the name and start location for each trip that has the type Biking. 3. List the name of each trip that has the type Hiking and that has a distance of greater than six miles. 4. List the name of each trip that has the type Paddling or that is located in Vermont (VT). 5. How many trips have a type of Hiking or Biking? 6. List the trip name, type, and maximum group size for all trips that have Susan Kiley as a guide. 7. List the trip name and state for each trip that occurs during the Summer season. Sort the results by trip name within state. 8. List the name of each trip that has the type Hiking and that is guided by Rita Boyers. 9. How many trips originate in each state? ter than $20 but less than $75? 10. How many reservations include a trip with a pri the number of persons 11. List the reservation ID, customer last name, ar included in the reservation is greater than four mpshire 12. List the trip name, the guide's first name, and Post-it Notes (NH), Sort the results by guide's last name w occur in 13. List the reservation ID, customer number, cu I post-it s mponir Notes are Recyclable www.Post-it.com Post-It Noi E Post-it Post-ik 2018 tots ons

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions