QUESTION 2 Exercise: Create a statement that will show the sum of all the payments received on or after 2018-08-01. The new column should be titled: recent_payments_received Hint: If you did this correctly, you will have one column (and one row) showing the following amount 59755 88
Q: An organization has committed to matching pledge amounts based on the donor type and pledge amount.…
A: The PL/SQL is in the next step-
Q: The tblCities table contains a numeric field named Population. Which of the following LINQ…
A: Answer: The LINQ statement that calculates the total population of all the cities in the table is,…
Q: 5. Display the maximum and minimum amount of the customer. 6. Display all items ending with 'et' and…
A: Given table:
Q: table name: Accounts columns: account_num char(9) which is the primary key name varchar (20)…
A: SQL: CREATE TABLE Accounts ( account_num char(9) PRIMARY KEY, namevarchar(20), balance double );…
Q: Write a Select statement that returns the Trading_Symbol column and the Num_Shares column only from…
A: Sample Response: select Trading_Symbol ,Num_Shares from rows where Selling_Price > Purchase_Price…
Q: Write SQL statements that will 1. create a table named Flavors with columns itemcode(int),…
A: The solution for the above-given question is given below:
Q: What formula matches the definition : "Returns a table that contains a column of dates that begins…
A: DATESBETWEEN:- Returns a table containing a column of dates that starts on the provided start date…
Q: To select the category from listbox1 when the item selected from listbox1 the item of the category…
A: To select the category from listbox1 when the item selected from listbox1 the item of the category…
Q: 6. Display the calculated total amount for Order 103 (Orders.id = 103). How to calculate the total…
A: 6. SELECT order_id, SUM(price) AS total amount FROM Order O, Order_product OP, Products P,…
Q: please use the picture below to answer the following question Display employee number, employee…
A: SELECT EmployeeID, Emp_LName, HireDate FROM Employee e JOIN Position pWHERE e.Emp_LName like '%e%'…
Q: Determine the amount of total profit generated by the book purchased on order 1002. Display the book…
A: Solution: Correct Answer is: Option C SELECT title, TO_CHAR(quantity*(paideach-cost),…
Q: PL/SQL Create a simple loop that prints instructor names, where instructor IDs are in the range…
A: Required: PL/SQL Create a simple loop that prints instructor names, where instructor IDs are in…
Q: Type Reduction in cell M1 The amount is 50% of sick days above 10, whenever sick days exceed 10.…
A: We need to find the formula using if else.
Q: Complete the following exercise: Alter your student table adding a new column called enroll_date…
A: Alter your student table adding a new column called enroll_date using the datetime data type.…
Q: Question 8. All rows correspond to students whose rollnum's are between 20 and 30. (i) SELECT * FROM…
A: Given sentence in SQL database
Q: 8- Write a query to generate the total number of invoices, the invoice total for all of the…
A: SQL is a language to operate databases in searching and filtering the data according to the query
Q: Display the PID and average prices from the PRODUCTS table which price is less than the average…
A: Here we need to perform group by operation in the main query and use Having clause to select only…
Q: Use LargeCO tables to complete this assignment. Write a stored procedure that adds a new employee…
A: Syntax to create procedure: CREATE [OR REPLACE] PROCEDURE procedurename ( parameter_name1 [IN | OUT…
Q: MS SQL SERVER Write a statement to create a stored procedure named Find_Contact based on the…
A: ANSWER:-
Q: Below code intends to use a variable grade to store a set of grades. Explain what is the syntax…
A: Note: As per Q and A guidelines we are only supposed to answer 3 sub parts of a question, so solving…
Q: Budget - Using Excel Choose and Match Functions Put formulas in the yellow cells only and do not…
A: Using Excel to calculate Budget Here using Match and Choose Function to calculate the budget using…
Q: UPDATE tablename 大★★★★ [WHERE conditionlist]; The command replaces the ***** in the above statement…
A: syntax is: update table set column = 'xyz' where condition;
Q: 2. Write a script that creates and calls a stored procedure named invoice_balance. This stored…
A: ANSWER : To solve the given question we want tocreate and call a stored procedure named…
Q: Create a MySQL table named 'prime_test' that contains two columns. The first column is an integer…
A: SQL Query for creating table: CREATE TABLE prime_test { number int NOT NULL, is_prime varchar(50),…
Q: Column Name Sie Constraints Data Type DepelD Varchar 4 Primary key DepeName 40 Not mull Varchar…
A: I have created the query below for the table:
Q: 4.7 LAB - Select number of movies grouped by year The Movie table has the following columns: ID -…
A: Answer is given below Creating Movie table and inserting sample data: create table Movie (ID…
Q: Write a script to create a PL/SQL procedure called findSal that displays the doctor’s salary and…
A: A procedure is created with the CREATE OR REPLACE PROCEDURE statement. The simplified syntax for the…
Q: EMP NO EMP NAME | EMP COMM DEPTNO | DEPT NAME | MIN SAL | MAX SAL | DEPTNO EMP EMP SAL | DEPTNO |…
A: /* Creation of EMP table, I am creating column EMP_FIRST_NAME and EMP_LAST_NAME instead of…
Q: The InstantRide Finance team also wants to analyze travels where more than the average discount rate…
A: Since you have not specified the table name , let us assume that the data is present in TRAVELS…
Q: The Movie table has the following columns: • ID - integer, primary key Title - variable-length…
A: In order to get required result we have to use Select statement Select year,count(id) this…
Q: In SQL, you use the __ statement to retrieve the rows in a table. Question 7 options: SELECT…
A: Given: In SQL, you use the __ statement to retrieve the rows in a table. Question 7 options:…
Q: Q1. Put the solution to the following mathematical calculation into a variable "Quiz4Calc" :…
A: Please upvote. I am providing you the correct answer below. Please please please please.
Q: Question 4 Listen In 01 of the IF worksheet enter a SumIF function to find the total price of homes…
A: 1. Creating an sample excel sheet . City Price ABC 250000 Cheyenne 320000 XYZ 450000 XYZ…
Q: Replace 456 with your last 3 digits in your student number The procedure must have: an input…
A: Code is given below. drop table VECHICLERENT; CREATE TABLE VECHICLERENT ( VEHICLE_ID…
Q: In which normal form no column should depend on other columns? O You must select at least 1 choice O…
A: Let us understand what the First Normal Form(1NF) is. A relation or table is said to be in first…
Q: Which clause do you add to the following SELECT statement to limit the display to those categories…
A: SELECT catagory_id, SUM(price) FROM products GROUP by catagoriy_id a. HAVING SUM(price)<5000 or…
Q: Create a stored procedure called sp_shipping_date where the billing date is equal to the order date…
A: Given create procedure sp_shipping_date (@billing_date datetime) as select Orders.OrderID,…
Q: I. Which normal form is the following table in? I. Transfer the table to 3rd Normalised form and…
A: Primary key is (agreementID, BuildingID) The FDs are AgreementID -> Duration UnitID ->…
Q: The ITEM table contains the following columns statement. Analyze the statement why it will fail…
A: Find the required answer given as below :
Q: Objective: At the end of the exercise, the students should be able to: Use arithmetic operators and…
A: Given student course table for we have to create table and insert data and write the queries using…
Q: 6.7 LAB - Select tall horses with subquery This lab will be available until April 5th, 11:59 PM CDT…
A: In step 2, you will get SQL code.
Q: Using the sp_InsertTeamDetails (check link above) procedure, create a query to insert the following…
A: The table is given below:-
Q: The following statement uses a non-correlated subquery to find the South American country with the…
A: Question 1. The following statement uses a non-correlated subquery to find the South American…
Q: The Movie table has the following columns: ID - integer, primary key Title - variable-length string…
A: The query along with a screenshot of the output is given below.
Q: Orderltem OrderID item quantity 1 Fahita Menu 1 Pepsi Item type price 1 Shawarma Coca Drink 1.5 1…
A: Below is the answer of both questions. I hope this will be helpful for.
Q: ?Which of the following symbols cannot be used in a table name .a % b none of the above .co # .d O
A: Name contains symbols but can not start with symbols. Starts with a letter only. Table name…
Q: Write a SQL statement to display Invoice Number and total sale for each Invoice.
A: The given diagram shows the relationship of tables in database. The table invoice shows the complete…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
- You have been instructed to add a new student information to the students table. Because the student is new, he has no marks before, you should not add an amount to the CGPA. The Students table contains these columns: Student_id NUMBER(10) Student_name VARCHAR2(30) Student phone NUMBER(10) CGPA NUMBER(2,2) Which INSERT statements will accomplish your objective? O a. INSERT INTO students VALUES (365, 'Khalil',99554721, 0 ) O b. INSERT INTO students VALUES (365, 'Khalil',99554721, 'NO CGPA' ) O c. INSERT INTO students VALUES (365, 'Khalil',99554721, NULL ) O d. INSERT INTO students VALUES (365, 'Khalil',99554721) Which line of code has an error? 1. CREATE TABLE FRUITS VEGETABLES 2. FRUIT TYPE VARCHAR2, 3. FRUIT NAME CHAR (20), 4. QUANTITY NUMBER (4)); O a. 1 O b. 2 O c. 3you are supposed to create an excel sheet for student grade sheet. There must be at least 10 records. Following columns will be needed for the sheet. Also add summary of the grades as follows. Grade Count A 6 B 4 C 8 D 2 F 10 TOTAL 30 Grading Criteria to calculate grades is as follows: Marks Grade 90-100 A 80-89 A- 75-79 B+ 70-74 B 65-69 C+ 60-64 C 50-59 D Less than 50 FQ11: After mapping the following ERD, choose the correct SQL statement that will insert a single row to the Vertebrates Table AID weight Vertebrates vertrebraLength Animal AName Disjoint ISA Invertebrates locations Eats amountPerDay type Food FID a. Insert into Vertebrates (VertebratesLength) values (1.5') b. Insert into Vertebrates (AID, AName, Weight) values (101', 'Salmon', '30') c. Insert into Vertebrates (AID, AName, Weight, VertebratesLength) values (101, 'Salmon', '30','1.5) d. Insert into Vertebrates (AID, Vertebrates Length) values (101', '1.5')
- 9. Write a SELECT statement that uses aggregate window functions to calculate the total due for all vendors and the total due for each vendor. Return 3 Columns: The vendor id from the Invoices table. The balance due (invoice_total-payment_total-credit_total) for each invoice in the invoices table with a balance greater than 0. The total balance due for all vendors in the Invoices table. Modify the column that contains the balance due for each vendor so it contains a cumulative total by balance due.Task 3: The InstantRide Finance team wants to know the average discount amounts for each car in the InstantRide. Calculate the average discount amount as monetary value for the travels where a discount is applied. You need to create a subquery over the TRAVELS table to retrieve CAR_ID and DISCOUNT_AMOUNT, calculated with 2 decimals using the ROUND function. To calculate the DISCOUNT_AMOUNT , multiply the TRAVEL PRICE by the TRAVEL_DISCOUNT where the TRAVEL_DISCOUNT value is not NULL. Round the result to 2 decimals. Then you can use this subquery to get the CAR_ID and AVG of DISCOUNT_AMOUNT values, once again using the ROUND function on the average results. Group the results by the CAR_ID. Use CAR ID and DISCOUNT_AMOUNT as column aliases and return it back to the Finance team.7-Display last name of employees whose manager is KING.8-Display last name, salary and job title of all employees who earns more than the lowest salary. (Employees andJobs)9-Display all employees including King, who has no manager. Order the results by the employee number.10-Display the name and hire date of any employee hired after employee Davis
- Task 3: The InstantRide Finance team wants to know the average discount amounts for each car in the InstantRide. Calculate the average discount amount as monetary value for the travels where a discount is applied. You need to create a subquery over the TRAVELS table to retrieve CAR_ID and DISCOUNT_AMOUNT, calculated with 2 decimals using the ROUND function. To calculate the DISCOUNT_AMOUNT, multiply the TRAVEL_PRICE by the TRAVEL_DISCOUNT where the TRAVEL_DISCOUNT value is not NULL. Round the result to 2 decimals. Then you can use this subquery to get the CAR_ID and AVG of DISCOUNT_AMOUNT values, once again using the ROUND function on the average results. Group the results by the CAR_ID. Use CAR_ID and DISCOUNT_AMOUNT as column aliases and return it back to the Finance team. Task: Calculate the average discount for each car.Task 3: The InstantRide Finance team wants to know the average discount amounts for each car in the InstantRide. Calculate the average discount amount as monetary value for the travels where a discount is applied. You need to create a subquery over the TRAVELS table to retrieve CAR_ID and DISCOUNT_AMOUNT, calculated with 2 decimals using the ROUND function. To calculate the DISCOUNT_AMOUNT, multiply the TRAVEL_PRICE by the TRAVEL_DISCOUNT where the TRAVEL_DISCOUNT value is not NULL. Round the result to 2 decimals. Then you can use this subquery to get the CAR_ID and AVG of DISCOUNT_AMOUNT values, once again using the ROUND function on the average results. Group the results by the CAR_ID. Use CAR_ID and DISCOUNT_AMOUNT as column aliases and return it back to the Finance team. Task: Calculate the average discount for each car. (SQL Database Test)Task 3: The InstantRide Finance team wants to know the average discount amounts for each car in the InstantRide. Calculate the average discount amount as monetary value for the travels where a discount is applied. You need to create a subquery over the TRAVELS table to retrieve CAR_ID and DISCOUNT_AMOUNT, calculated with 2 decimals using the ROUND function. To calculate the DISCOUNT_AMOUNT, multiply the TRAVEL_PRICE by the TRAVEL_DISCOUNT where the TRAVEL_DISCOUNT value is not NULL. Round the result to 2 decimals. Then you can use this subquery to get the CAR_ID and AVG of DISCOUNT_AMOUNT values, once again using the ROUND function on the average results. Group the results by the CAR_ID. Use CAR_ID and DISCOUNT_AMOUNT as column aliases and return it back to the Finance team. Task: Calculate the average discount for each car. You need to first calculate the discount amount for each car using the ROUND function. Then use a subquery to calculate average discount amount using AVG…
- Write a Select statement that returns the Trading_Symbol column and the Num_Shares column only from the rows where Selling_Price is greater than Purchase_Price and Num_Shares is greater than 100. The results should be sorted bythe Num_Shares column in ascending order.7. Use the UNION operator to generate a result set consisting of three columns from the Products table: Discount status A calculated column that contains a value of DISCOUNTED or FULL PRICE Product_name The product_name column discount_percent The discount_percent column If the product has a discount_percent greater than 0, the Discount_status column should contain a value of DISCOUNTED. Otherwise, it should contain a value of FULL PRICE. Sort the final result set by product_name.Question 3 Below code intends to use a variable grade to store a set of grades. Explain what is the syntax error and how to get it fixed. Only one line of code can be changed with other lines still being used. grade = (90,) grade.append(80) grade.append(70) grade.append(85) # syntax error: # how to fix: What sequence type you should use to create a look-up table between the following departments and colleges? The science college has departments of geo, bio; the Arts college has departments of anth, history. Complete the code so that the code will print out the college where the geo department is in. #Sequence type: dept2col= "geo":"science", "bio":"science", "anth":"Arts", "history":"Arts" print dept2col Which of the following statements are correct? O ArcPy data access module has been avaíable since ArcGIS 10.1 O ArcPy data access module has been avaiable since ArcGIS 10.o. O ArcPy data access module offers a cursor with faster access to data. O The cursor in data access module is the…