Question

In: Computer Science

Question 1. Write the statement to increase the invoice_total by 25% using the INVOICES table for...

Question 1. Write the statement to increase the invoice_total by 25% using the INVOICES
table for all vendors whose vendor_id is less than 100.

Question 2. Write the statement to answer the following question: What is the total of the
invoice_total amounts after the update. I need your statement and the result stated
here.
Question 3. Write the statements to list the customer ID and Order ID from the ORDERS
table for all orders with order id greater than 700.

Question 4. Write the statement to delete the order with order ID = 1021.

Question 11. Write the statement to show the total number of rows in the Orders table. Also,
write the number of rows returned from the query.

Solutions

Expert Solution

Question 1. Write the statement to increase the invoice_total by 25% using the INVOICES
table for all vendors whose vendor_id is less than 100.

select vendor_id, invoice_total*0.25 from INVOICES where vendor_id < 100;

Question 2. Write the statement to answer the following question: What is the total of the
invoice_total amounts after the update. I need your statement and the result stated
here.

appropriate information not provided.


Question 3. Write the statements to list the customer ID and Order ID from the ORDERS
table for all orders with order id greater than 700.

select customer_id, order_id from ORDERS where order_id >700;

Question 4. Write the statement to delete the order with order ID = 1021.

delete from ORDERS where order_id = 1021;

Question 11. Write the statement to show the total number of rows in the Orders table. Also,
write the number of rows returned from the query.

select count(*) as total_number_of_rows from ORDERS;

note: the relational schema and records are not provided and hence the results cannot be shown. The answers are given based on the information provided. Also, while writing the statements keep in mind the table names and column names are case sensitive. Try these out and if you face any problem, feel free to ask I will be there to help.


Related Solutions

1. Write the statement that will display all of the information in the PetOwner table using...
1. Write the statement that will display all of the information in the PetOwner table using the asterisk (*) notation. 2. Write the statement that will display all of the information in the PetOwner table without using the asterisk (*) notation. 3. Write the statement that will display the first and last names of the owners in that order. 4. Write the statement to display the breed, type and DOB of all pets having a type of Cat. 5. Write...
1. Write a query to: a. select data from INVOICES table as follows: Invoice date in...
1. Write a query to: a. select data from INVOICES table as follows: Invoice date in MM/DD/YYYY format Invoice Date in DD-Mon-YYYY format Invoice Total rounded to the nearest dollar Note: you can alias columns as you sit fit b. select data from VENDORS table as follows: Vendor Name Concatenate Vendor Name with the string ‘s Address Concatenate Vendor City, Vendor State and Vendor Zip Code (alias this) Your output should look like this (this is just an example of...
Question 1 – Inserting data to the CITY table Using the following DML statement: INSERT INTO...
Question 1 – Inserting data to the CITY table Using the following DML statement: INSERT INTO CITY (id, name, countrycode, district, population) VALUES (7000, ‘Guelph’, ‘CAN’, ‘Ontario’, 131794); Query the CITY table to ensure this row was inserted correctly. Provide screenshot of your ‘SELECT statement’ and resultset pane here                Insert another row into the CITY table with the following values:                               Id                           7002                               Name                   Montebello                               Countrycode       CAN                               District                 Quebec                               Population          983 Provide screenshot...
1. Write a SQL statement which joins the rider_student table with the rider_major table and lists...
1. Write a SQL statement which joins the rider_student table with the rider_major table and lists the rider student name and the name of the major (major_name) and the description of the major for which they are currently assigned. (You may use the SQL 'join' subclause, or simply express the join as part of the 'where' clause by indicating that you only want records where the primary key of the child table, rider_major, equals the corresponding foreign key of the...
1. write a truth table using this symbol: --> 2. write the inputs for the truth...
1. write a truth table using this symbol: --> 2. write the inputs for the truth table to the left of the --> and write the outputs for the truth table to the right of the --> 3. write the compliment, or NOT using ' As an example: The truth table for AND is written this way: A B --> A AND B 0 0 --> 0 0 1 --> 0 1 0 --> 0 1 1 --> 1 or...
QUESTION 43 How many of the following statements is/are true? Statement 1: An increase in the...
QUESTION 43 How many of the following statements is/are true? Statement 1: An increase in the market YTM after a bond is purchased but before the first coupon date will lead to a realized return equal to the YTM of the bond when the bond was purchased for a buy-and-investor. Statement 2: A decrease in the market YTM after a bond is purchased but before the first coupon date will lead to a realized return equal to the YTM of...
QUESTION 2 Using the following table. Write a concise, relevant, accurate and precise interpretation of the...
QUESTION 2 Using the following table. Write a concise, relevant, accurate and precise interpretation of the SPSS output provided assuming the dependent variable is Total Perceived Stress. Include supporting statistical evidence. ……………………………………………………………………………………………………………….. ……………………………………………………………………………………………………………….. ……………………………………………………………………………………………………………….. Correlations Total perceived stress Total Optimism Total Mastery age Total perceived stress Pearson Correlation 1 -.469** -.612** -.127** Sig. (2-tailed) .000 .000 .008 N 433 432 433 433 Total Optimism Pearson Correlation -.469** 1 .546** .201** Sig. (2-tailed) .000 .000 .000 N 432 435 435 435...
Question 1: Broussard Skateboard's sales are expected to increase by 25% from $7.8 million in 2016...
Question 1: Broussard Skateboard's sales are expected to increase by 25% from $7.8 million in 2016 to $9.75 million in 2017. Its assets totaled $2 million at the end of 2016. Broussard is already at full capacity, so its assets must grow at the same rate as projected sales. At the end of 2016, current liabilities were $1.4 million, consisting of $450,000 of accounts payable, $500,000 of notes payable, and $450,000 of accruals. The after-tax profit margin is forecasted to...
Write a SQL statement which joins the parts table with the supplier table and lists the...
Write a SQL statement which joins the parts table with the supplier table and lists the part_name, supplier_name for all parts in the part table. The supplier_id column in the suppliers table is the primary key in the suppliers table, and this key has been exported to the parts table where it is a foreign key. You should use an inner join for this query. Write a SQL statement which joins the parts table with the suppliers table and lists...
Write a SQL statement which joins the parts table with the supplier table and lists the...
Write a SQL statement which joins the parts table with the supplier table and lists the part_name, supplier_name for all parts in the part table. The supplier_id column in the suppliers table is the primary key in the suppliers table, and this key has been exported to the parts table where it is a foreign key. You should use an inner join for this query. Write a SQL statement which joins the parts table with the suppliers table and lists...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT