Column Name Туре Trading_Symbol nchar (10) Company_Name nchar (25) Num_Shares int Purchase_Price money Selling_Price money
Q: Student Name: Student Number: Write a PL/SQL Program to do the following Your Program should request…
A: Answer is given below-
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: OB. The function must contain a return statement. Oc.It is similar to the PL/SQL procedure except…
A: Which of the following is not true about the PLSQL functions? OPTION : B
Q: Create a function name BALANCE that returns the status of outstanding amount for each customer. Use…
A: Required : Function name : BALANCE It returns the status of outstanding amount for each customer. IF…
Q: nt that
A: The explicit join syntax makes use of two keywords, ON and JOIN. ON keyword is used to specify the…
Q: SOQL Assignment Salesforce: You have to write a SOQL query in which we have to find out all the…
A: Use the Salesforce Object Query Language (SOQL) to search your organization’s Salesforce data for…
Q: The WHERE statement identifies the. Sort None of these Filter All of these Table Fields
A: The WHERE statement identifies the
Q: input type="hidden" name="bokId" value="897"> input type="submit" name="send" value="Show Booking…
A:
Q: In sql get to know the HR database, its tables, and their contents. Show the SQL query and the…
A: SQL: SQL stands for a structured query language, it used to manage the data and organize the data in…
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: Use LargeCO tables to complete this assignment. Write a stored procedure that adds a new employee…
A: Actually, database is used to stores the data.
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: 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: 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: If order by command is not used, what is the default value?
A: Start: TipWhen there is no specified sequence (ascending or descending), the order by declaration…
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: UPDATE tablename 大★★★★ [WHERE conditionlist]; The command replaces the ***** in the above statement…
A: syntax is: update table set column = 'xyz' where condition;
Q: alculate the average discount for each car
A: SELECT AVG(TRAVEL_DISCOUNT) FROM TRAVELS WHERE CAR_ID=1001; SELECT AVG(TRAVEL_DISCOUNT) FROM TRAVELS…
Q: What does the funnel symbol that appears next to a field’s name in the Query Builder dialog box…
A: Query builder: The query builder is used to construct the SQL (Structured Query Language)…
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: 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: Select fname from employee where instr(fname,'a')=0; this query displays: a. The names that has a…
A: Since we can answer only up to 1 question. So we'll answer the first question. Please resubmit the…
Q: Queries can be used within statement(s): update delete All of the answers Insert
A: A SQL is a Structured Query Language. It uses queries to create database and extract information…
Q: Question 10 When sorting query output, you use the key words 'sort by'. Question 10 options:…
A: The given question is false.
Q: Use a LIST to store the sales data for each month with the three-letter abbreviation for the month…
A: Below i have given SQL queries:
Q: a. Write in SQL a command that creates the table Books according to the above description b. Write…
A: According to our policy we are allowed to solve only three subparts as your question does not…
Q: Create a function that converts temperature from Fahrenheit to Celsius. You need to use the most…
A: To create a User Defined Function (UDF) that converts Temperature from Fahrenheit to Celsius, that…
Q: Complete the following statement, which should calculate the sum of the values stored in a numeric…
A: Aggregate operators in LINQ LINQ, known as Language Integrated Query used in Visual Basic and C#…
Q: When is it appropriate to nest a subquery within a HAVING clause?
A: answer is
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: create a table name flovors with columns itemcode (Int), ItemDesc (varchar), and Price (float)
A: We need to write a SQL query to create a table named "flovors" with columns as follows- itemCode…
Q: Column Name Data Type Constraint (Column Level) DoctorID Number(4) Should not be empty and not…
A: The table is created using the following query. Create table query for the table Doctors: Create…
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: 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: The ITEM table contains the following columns statement. Analyze the statement why it will fail…
A: Find the required answer given as below :
Q: he InstantRide Finance team wants to know the average discount amounts for each car in the…
A: The given problem is to be solved using SQL query where the given tables: CAR and TRAVEL are to be…
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: 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: TION 6 set operator that combines all rows from two tables, including duplicate rows. UNION NTERSECT…
A: Option (c) is correct option
Q: The sold products names for each date should be sorted lexicographically. Return the result table…
A: Create Activities table: CREATE TABLE Activities(sell_date date,product varchar(50));…
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 by
the Num_Shares column in ascending order.
Step by step
Solved in 2 steps
- 1. Use the following table to answer the questions below: Table name: Products Column Data Type Length Constraint Role Name Stores the ID of a product P ID P_Name Primary key Number Stores the name of a Varchar2 25 product P_entryDate Stores the entry date of a product Date Cannot be null P_Expiry Stores the expiry date of a product Date P_Еxpiry date should be greater than P_entryDate P_Price Stores the price of a product Number 3,2 Cannot be null a. Write a SQL query that displays the mumber of products that will expire in the year 2021 b. Write in SQL a query that displays the ids of the most expensive products c. Create a view named ProductDetails' to hold all the details of products whose names start with 'DELL' and their prices are between 200 and 500 Omani RialsExamine this product table's column definitions:pid number primary keypname varchar2(50)You must display column headings as shown:Product_ID Product NameWhich SELECT statement does this? SELECT pid Product_ID, pname Product Name FROM product; SELECT pid Product_ID, pname "Product Name" FROM product; SELECT pid @Product_ID, pname @"Product Name" FROM product; SELECT pid AS Product_ID, pname AS Product Name FROM productProduct_id Product_name Category Mfg_date Exp_Dte Product_price 01 Dairy Milk Choclate Junk 2,Aug, 2019 2aug, 2020 80 02 Lipton Tea Bags Not junk 2,jan 2019 2, jan 2020 160 03 Kurkure junk 2, april 2919 2, april, 2021 30 04 Shezan Juice Junk 3,Aug, 2019 3,aug, 2020 30 06 Olpers Milk Not junk 3,april, 2018 3,april, 2020 350 Canteen_table 1: Write query to create canteen_table. Put check on category values as only “junk” and “Not junk”. Change colum name of product_price to unit_price. Display products manufactured between 1, jan 2019 to 1, May 2019. Display count of only junk food items in canteen_table with alias name as “junk Food Count”. Display Count Of both Junk food and not junk food products whose count is greater then 1.
- Create a table named company with these columns: Company_id varchar(255) Company_name varchar(255) default ‘x’ Hq_phone_number varchar(255) Primary key of company_id (please use constraint format) Unique key of Hq_phone_number (please use constraint format)Write Create Table SQL statements Work Session table The table must have a primary key. The table must have appropriate foreign key constraints. Foreign keys must have the same name, datatype and size of the primary key that they refer to The following columns datatypes and sizes and named constraints must be used Column DataType Constraint WorkYear number(4) Range 2019 - 2020 WorkWeek number(2) Range 1-52 WorkHours number(4,2) Range 0.5 – 99.99 BID NUMBER(4) ,AUTHID NUMBER(4)Write SQL Queries for following Emp table :EMPLOYEE_IDName EMAILHIRE_DATESALARYDEPARTMET 1001 Juniad Juniad@abc.com 2010-06-18 110000.00 CS1002 Irfan Irfan@abc.com 2011-04-16 100000.00 Sales1003 Hassan Hassan@abc.com 2010-03-08 88000.00 Marketing1004 Fahad Fahad@abc.com 2013-01-28 90000.00 Sales1005 Husnain Hus@abc.com 2012-01-28 55000.00 ES 5. Write a query to get the total salaries payable to employees.6. Write a query to get the maximum, minimum, sum, average salary and number of employees from emp table.7. Write a query to find name whose name Start with ‘H’ and 'J'.8. Write a query get all names from employees table in upper case.9. Write a query to select first 2 records from a table.10. Write a query to get the name of employees ends with character ‘N’. Such as Hassan etc.11. List all employee and add 500 to their salaries, also change the column heading to Salary WithBonus.12. Show all records whose salary is more than 55000.00 and less than 100000.00 Plz give me all ans
- 1. Use the following table to answer the questions below: Table name: Products Column Role Data Type Length Constraint Name Stores the ID of a product Stores the name of a product P_entryDate Stores the entry date of a | product Stores the expiry date of a product P_ID P_Name Number Varchar2 |Primary key 25 Date Cannot be null P_Expiry Date P_Expiry date should be greater than P_entryDate |Cannot be null P_Price | Stores the price of a product | Number 3,2 2. a. Write in SQL a command that creates the table Products according to the above description b. Write in SQL a statement that adds to the table Products a new column named supplierlD of type Number(5). This column should be defined as a foreign key that relates the table Products to the table Supplier c. Write in SQL a query that lists all the details of products arranged in descending order according to the entry date a. Write a SQL query that displays the number of products that will expire in the year 2021| e. Write in SQL a…Table : PURCHASE_ORDER ORDER_NO AMOUNT ORDER DATE CUSTOMER_ID SALESMAN_ID DELIVERY DATE 1001 300 05-03-2017 2001 3001 05-05-2017 1002 200.20 10-07-2017 2002 3003 10-10-2017 1003 600 12-06-2017 2005 3002 12-08-2017 1004 400.25 10-05-2017 2003 3004 10-07-2017 1005 500.10 03-08-2017 2004 3005 03-05-2017 1006 400 10-07-2017 2005 3006 10-10-2017 Table: PURCHASE _DETAILS ORDER_NO PRODUCT_NAME PRICE QUANTITY 1001 KEYBOARD 56 100 1002 MONITOR 36 200 1003 MOUSE 100 1004 HARD_DISK 58 300 1005 RAM 25 500 1007 CABINET 100 a) Write a SQL query to display PRODUCT_NAME, ORDER DATE and find number of years between the DELIVERY_ DATE from the CURRENT DATE [Hint: Use ON Clause]. b) Write a SQL query to display matched records from PURCHASE_ORDER table and all records from PURCHASE_DETAILS. c) Write an SQL query to display ORDER_NO, PRODUCT_NAME from table ORDER_DETAILS of products where the price is less than average price of products. [Hint: Use Subquery]. d) Write an SQL query to display ORDER_NO,…PRODUCTS PID DESC PRICE SID QTY 801 Pencil 3 1 10 802 A4 6 2 15 803 Ballpen 4 2 804 Marker 2 3 20 SUPPLIERS SID SNAME STYPE LOCATION 1 Lulu DS Salalah 2 C4 DS Saadah 3 Smile WS Awqad Display the maximum price of all the products in PRODUCTS table for each Supplier ID having a maximum price more than 5.
- Create the ROOMS table using the specification below: Table Name: ROOMS Field Name/ Data Type Size Constraints column name RID Number 8 PRIMARY KEY RType Varchar2 25 NOT NULL Rate Number Bedroom Number 5 Room Status Varchar2 10 REFERENCES to CID in Clients Table CID NumberQuery: List the IDs of the tutors who are currently tutoring more than one studentDisplay details of employee with ID 150 or 160.