Retrieve the employee_id, First_name, Last Name as "Full Name", and net salary (salary + commission) of all employees that last_name start with character 'A'? O a select employee id, first name||' '||last name "Full Name", salary+salary*nvl(commission_pct,0) from employees where last name like %A'; O b, select employee id, first namell' 'I|last name "Full Name", salary+salary*commission pct from employees where first name like 'AX'; select employee id, first name|T' '||last_name "Full Name", salary+salary"nvl(commission_pct,@) O c. from employees where first name like 'AX'; O d. select employee id, firstname||' '||lastname "Full Name", salary+salary*DxA(commission_pct,@) from employees where last name like 'A%';
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: According to your student number and the following formula, please answer the corresponding…
A: Since you are not specified any language for implementation. Hence, I am writing in C language.…
Q: You need to find out the names of all employees who belong to the same department as the employee…
A: Before solving the answer lets clearly understand the question:- There are two tables employee and…
Q: rite an anonymous block to read two numbers from the keyboard, then find out what's the maximum…
A: REQUIRED: Write an anonymous block to read two numbers from the keyboard, then find out what's the…
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: Given a database of bike share information write a SELECT statement to retrieve the bike_number,…
A: To execute the SQL queries, firstly we should have a database containing the tables. Later the…
Q: The Brewbean’s application contains a page displaying order summary information, including IDBASKET,…
A: The Brewbean’s application contains a page displaying order summary information, including…
Q: Create a store procedure that displays the names of salesman located in Paris and their commission
A: Stored Procedure: It is a prepared SQL code that you can save, so the code can be reused over and…
Q: Which of the following function chooses a random index as the pivot? A. int Median(arr, left,…
A: Question. Which of the following function chooses a random index as the pivot? A. int…
Q: Write a function called queryData() which will search the customerArray and output the following…
A: <!DOCTYPE html><html><body> <p>Jeff Smith is a 17 year old Male from London,…
Q: --Creating the tables USE Bobs_Home_Repair; DROP TABLE IF EXISTS dbo.BOB_EMPLOYEE; CREATE TABLE…
A: Database : It is collection of data which can be managed,accessed and maintained easily. Data Schema…
Q: Why am I getting a error message when trying to INSERT data for the table?? (photo attached)
A: Error:The data type for the “DEPARTMENT_ID” is declared as “int” type in the CREATE query but the…
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: go create table salesman( salesman_id int primary key, name varchar(30), city varchar(20),…
A: select sum(commission) as total_commision from salesman; the above function will calculate total…
Q: i keep getting this message Msg 1778, Level 16, State 0, Line 23 Column 'salesman.salesman_id' is…
A: Given error is Column 'salesman.salesman_id' is not the same data type as referencing column…
Q: You need to return all travel data from the TRAVELS table for the CAR_ID which has a plate number…
A: Here, you need to join both the tables with same car_id whose car_plate is BB-883-***
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: I think my query needs temp variables instead of using NEW but I am not sure how. Here is my…
A: We need to use the ":" before the NEW or OLD words in triggers to refer the new or old data. So,…
Q: 1- Generate a listing of all purchases made by the customers, using the output shown below as your…
A: Solution: We have to sort the results by customer code, invoice number, and product description…
Q: Need assistance with SQL assignment question: Populate the CUST_NUM, INV_DATE, and INV_AMOUNT…
A: To insert data into table, there must be a table So, first of all create a table and then execute…
Q: Write a SELECT statement that returns two columns based on the EMPLOYEES table. Contact, is the…
A: SELECT CONCAT(LastName," ",substring(FirstName,1,1)) as CONTACT, HomePhone as Phone FROM EMPLOYEES…
Q: Create table Medicine (MInventory_Id int primary key, M_Name varchar (40), Manufacturer varchar…
A: In sql the following queries must be entered to create two tables "Medicine" and…
Q: The HAVING clause applies to columns and expressions for individual rows, while the WHERE clause is…
A: Refer to step 2 for the answer.
Q: this is the code i run in sql developer CREATE TABLE MARKETING_CAMPAIGN( MACampID int,
A: CREATE TABLE MARKETING_CAMPAIGN(MACampID int,MACampName varchar(30) not null,MACampDescr…
Q: Apply a Normal Form on the following table by drawing new table(s). Then answer question: which…
A: The given table can be change into new table by using 1st normal form -because all the cells in…
Q: Which of the following statements would add a column job of type varchar 2 and size 20 to the…
A: Here, Question with options is given.
Q: According to the “Orders" table below, which of the following will output the customers who made…
A: Question :-
Q: mysqli_query($conn, $sql); if (mysqli_num_rows($result) === 1) { $row =…
A: Lets see the solution.
Q: Which of the following statements DOES NOT delete the last value in the list lst? a) 1st.pop(…
A: Dear Student, a) 1st.pop() will delete the last value in the list 1st b) 1st.remove(-1) will not…
Q: epartment DepartmentID DName ContactNo 1 UIIT 0300-1234567 2 UIMS 0300-4567891 Student RollNo…
A: required: Function which takes input data (RollNo, Sname, Fname and DepartmentID) of student from…
Q: Oracle SQL • Create a function that sums two numbers if any of the two numbers ins larger than 10 ,…
A: Given the following code
Q: Write a SELECT statement that returns all rows with salary, last name, street address and ZIP code…
A: Command:- CREATE TABLE EMPLOYEE(Employee_Id integer PRIMARY KEY, Last_Name text, Salary integer);…
Q: Write an anonymous block that will display only positive numbers between 1 and 20. p
A: Actually, SQL stands for structured query language.
Q: feature column in the datasets X_tr and x_te
A: import pandas as pd X_tr = pd.DataFrame(['a', 'b', 'c', 'd', 'e', 'f', 'g'], columns…
Q: Department DepartmentID DName ContactNo 1 UIIT 0300-1234567 2 UIMS 0300-4567891 Student RollNo Sname…
A: Actually, given information: Department DepartmentID DName ContactNo 1 UIIT 0300-1234567 2 UIMS…
Q: They need all the service requests with the category of Plumbing (category number 1) and Heating…
A: The given requirement is to be solved in the form of SQL command where the only service requests are…
Q: For name= "Michael", what is the output of the function Lpad(name,10,") ? O a. Michael*** O b.…
A: Here, Question with options is given.
Q: The file P02_02.xlsx contains data on 256 movies that grossed at least $1 million in 2017. • Recode…
A: The table containing data about 211 movies released is given below.
Q: CREATE TABLE Employee( Eid INT PRIMARY KEY, E_name VARCHAR(20), E_Age INT CHECK (E_Age between 18…
A: AS PER OUR POLICY “Since you have posted a question with multiple sub-parts, we will solve the first…
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: pl/sql Product(pid, pname, pprice, category) Use the table given above to write a PL/SQL…
A: create table Product(pid number primary key,pname varchar(100),pprice number,category varchar(100))
Q: Create a function that calculate the total commission
A: The solution is written in SQL query. Please check step 2 for the solution.
Q: The APPT_DTTM column stores the date and time of an appointment. Which of the following expressions…
A: Correct answer is option B
Q: Add daily simple returns to df. The outer column index should be named Return, and the inner column…
A: The following snippet may help. The question does not have enough information to be able to write a…
Q: The primary keys are identified below. The following data types are defined in the SQL Server.…
A: ANSWER:-
Q: make 2 different -stored procedure- query and explain.
A: stored procedure are used to perform different types of operation on table.If you want to delete a…
Q: FUNCTIONS Which of the following returns February 5th, 2009 as a date? SELECT ONE OF THE FOLLOWING…
A: As given, I need to find the correct function which returns February 5th, 2009 as date.
Q: 15. List the first name for all contacts and whether they have a spouse or not (yes/no). Order by…
A: Assume that the table name as "Person". SQL code to create the given table is as follows, create…
Q: on this table CREATE TABLE students ( std_id int NOT NULL PRIMARY KEY, f_name VARCHAR2(20),…
A: Answer has been explained below:-
Step by step
Solved in 2 steps with 2 images
- USE supermarkett; CREATE TABLE product(product_id INT NOT NULL,product_name VARCHAR(45) NOT NULL,price FLOAT NOT NULL,prod_discount INT NOT NULL,product_type VARCHAR(45) NOT NULL,PRIMARY KEY (product_id)); CREATE TABLE stock (stock_id INT NOT NULL,product_id INT NOT NULL,quantity INT NOT NULL,product_status BOOLEAN NOT NULL,PRIMARY KEY (stock_id),FOREIGN KEY (product_id) REFERENCES product(product_id));CREATE TABLE employee (emp_id INT NOT NULL,emp_name VARCHAR(45) NOT NULL,emp_number INT NOT NULL,address VARCHAR(45) NOT NULL,PRIMARY KEY (emp_id));CREATE TABLE supplier (sup_id INT NOT NULL,sup_name VARCHAR(45) NOT NULL,sup_number INT NOT NULL,address VARCHAR(45) NOT NULL,PRIMARY KEY (sup_id));CREATE TABLE login (login_id INT NOT NULL,password VARCHAR(45) NOT NULL,PRIMARY KEY (login_id)); ALTER TABLE stockADD FOREIGN KEY (product_id) REFERENCES product(product_id); ------------------------------------------------------------------------------- make 2 different -stored procedure- query…Create table Medicine (MInventory_Id int primary key, M_Name varchar (40), Manufacturer varchar (40), Price varchar (20), Quantity int, Exp_Date date); Create table PrescriptionMedicine (Prescription_Id int primary key, MInventory_Id int); Example of a table (Medicine) Insert into Medicine values(101, ‘Biaxin’, ‘Pfizers’, ‘$10.99’, 1, 10/5/02); Insert into MedicinePlease modify the code below for "Current Date" ********************************************************************** from pandas_datareader import data as pdrimport yfinance as yfin # Work around until# pandas_datareader is fixed.import datetimeimport pandas as pdimport matplotlib.pyplot as pltimport numpy as np# Show all columns.pd.set_option('display.max_columns', None)pd.set_option('display.width', 1000)def getStock(stk, numDays):print(stk)# Only gets up until day before during# trading hoursdt = datetime.date.today()# For some reason, must add 1 day to get current stock prices# during trade hours. (Prices are about 15 min behind actual prices.)dtNow = dt + datetime.timedelta(days=1)dtNowStr = dtNow.strftime("%Y-%m-%d")dtPast = dt + datetime.timedelta(days=-numDays)dtPastStr = dtPast.strftime("%Y-%m-%d")yfin.pdr_override()df = pdr.get_data_yahoo(stk, start=dtPastStr, end=dtNowStr)return df################################################################### CONFIGURATION…
- Complete the following JavaScript code in order to validate repeated students based on their ID within the “postStudent” function. Block Code: estControl.postStudent = (req,res)=>{ const {id, name,lastName} = req.body; if(!id || !name || !lastName){ res.status(400).send("Incomplete data {id, name, lastName}"); return; } const Student= { id, name, lastName } db.Students.push(Student); db.updateDB(); res.send('Student registered'); }Below is the code for a procedure that will accept a Customer ID as an input parameter and display the Customer ID, Customer Surname and Customer Address. Review the code, then answer the questions that follow. create or replace procedure sp_customer_details (c_id IN CUSTOMER.cust_id%TYPE,customer_details out VARCHAR2)ISBEGINSELECT 'CUSTOMER ID:' || c.cust_id || ', Surname:'|| c.cust_sname || ',ADDRESS:' ||c.cust_addressinto customer_detailsfrom CUSTOMER cwhere c.cust_id = c_id;END; Q.1 Briefly discuss the advantages of using the %TYPE attribute in the code. Q.2 Create the code to execute the procedure with exception handling if no customer data is found. Use customer ID C115 in your code.The InstantRide User Satisfaction team received a phone call from a user who might have left her wallet in the car. She indicated that the license plate of the car was starting with BB-883 but unfortunately, she could not remember the full license plate number. The team wants to get all travel information for the cars with the license plate starting with BB-883. You need to return all travel data from the TRAVELS table for the CAR_ID which has a plate number compared with SUBSTR and UPPER functions.
- CREATE TABLE MOVIE( mov_id int NOT NULL, mov_title varchar(255) NOT NULL, mov_releaseDate date, gen_id int NOT NULL, PRIMARY KEY (mov_id), FOREIGN KEY (gen_id) REFERENCES GENRE(gen_id) ); CREATE TABLE GENRE( gen_id int NOT NULL, PRIMARY KEY (gen_id), gen_name varchar(255) NOT NULL ); Search movies by year. Using the tables above, create a stored procedure, called getMovieByYear, that, given a year, returns all the movies which were released in that year. It displays the movie title, movie’s genre name, and release year.please use MySQL Workbench with screenshots of it for the explanation.CREATE TABLE MOVIE( mov_id int NOT NULL, mov_title varchar(255) NOT NULL, mov_releaseDate date, gen_id int NOT NULL, PRIMARY KEY (mov_id), FOREIGN KEY (gen_id) REFERENCES GENRE(gen_id) ); CREATE TABLE GENRE( gen_id int NOT NULL, PRIMARY KEY (gen_id), gen_name varchar(255) NOT NULL );Search movies by year. Using the tables above, create a stored procedure, called getMovieByYear, that, given a year, returns all the movies which were released in that year. It displays the movie title, movie’s genre name, and release year.Given five invoices with invoice totals of 20.00, 20.00, 30.00, 50.00, and 50.00, what values will the following function return for these rows? ___________________________________________ RANK() OVER (ORDER BY invoice_total)
- This kind of code gives me errors i have more info below. My codeDELIMITER //CREATE PROCEDURE GET_INVOICE_DATE (in I_INVOICE_NUM CHAR(5))DECLARE I_CUST_ID CHAR(5),DECLARE I_CUST_NAME VARCHAR(41),DECLARE I_INVOICE_DATE DATE BEGIN SELECT c.CUST_ID, CONCAT(c.FIRST_NAME, ' ', c.LAST_NAME), i.INVOICE_DATE INTO I_CUST_ID, I_CUST_NAME, I_INVOICE_DATE FROM INVOICES i INNER JOIN CUSTOMER c ON i.CUST_ID = c.CUST_ID WHERE i.INVOICE_NUM = I_INVOICE_NUM; END // Delimiter ; Helpfull info Task #6 – same process as Task #5• Procedure name is GET_INVOICE_DATE with I_INVOICE_NUM in parentheses with 5 characters• There should be 3 declare statements for I_CUST_ID CHAR(5); I_CUST_NAME VARCHAR(41); andI_INVOICE_DATE DATE is datatype• SELECT statement should include the CUSTOMER.CUST_ID, CONCAT for first_name andlast_name AS customer_name, invoice_date• INTO the 3 “I” fields in the declare statement• From should include the CUSTOMER and INVOICES tables• Where clause to join CUSTOMER.CUST_ID =…Create a function that calculate the total commission (code of tables CREATE TABLE Salesman ( [salesman_id] INT, [name] NVARCHAR(10), [City] NVARCHAR(8), [commission] NUMERIC(3, 2),);INSERT INTO Salesman VALUES (5001,N'James Hoog',N'New York',0.15), (5002,N'Nail Knife',N'Paris',0.13), (5005,N'Pit Alex',N'London',0.11), (5006,N'Mc Lyon',N'Paris',0.14), (5007,N'Paul Adam',N'Rome',0.13), (5003,N'Lauson Hen',N'San Jose',0.12); CREATE TABLE Customer ( [customer_id] INT, [cust_name] NVARCHAR(14), [city] NVARCHAR(10), [grade] INT, [salesman_id] INT);INSERT INTO Customer VALUES (3002,N'Nick Rimando',N'New York',100,5001), (3007,N'Brad Davis',N'New York',200,5001), (3005,N'Graham Zusi',N'California',200,5002), (3008,N'Julian Green',N'London',300,5002), (3004,N'Fabian Johnson',N'Paris',300,5006), (3009,N'Geoff Cameron',N'Berlin',100,5003), (3003,N'Jozy Altidor',N'Moscow',200,5007), (3001,N'Brad Guzan',N'London',NULL,5005); )…Hi please fix my code so that the output matches this: Course Information: Course Number: ECE287 Course Title: Digital Systems Design Course Information: Course Number: ECE387 Course Title: Embedded Systems Design Instructor Name: Mark Patterson Location: Wilson Hall 231 Class Time: WF: 2-3:30 pm main.cpp (do not change) #include "OfferedCourse.h" int main() { Course myCourse; OfferedCourse myOfferedCourse; string courseNumber, courseTitle; string oCourseNumber, oCourseTitle, instructorName, location, classTime; getline(cin, courseNumber); getline(cin, courseTitle); getline(cin, oCourseNumber); getline(cin, oCourseTitle); getline(cin, instructorName); getline(cin, location); getline(cin, classTime); myCourse.SetCourseNumber(courseNumber); myCourse.SetCourseTitle(courseTitle); myCourse.PrintInfo(); myOfferedCourse.SetCourseNumber(oCourseNumber);…