Test your Procedure with the following data: AthleteID= 10, First_Name = ‘Frankie’, Last_Name = ‘Fredricks’, DOB = ’17 June 1975’. Create your SQL statement that will test the procedure. EXEC spInsertAthleteDetails @AthleteID= 10, @First_Name = ‘Frankie’, @Last_Name = ‘Fredricks’, @DOB = ’17 June 1975’;
Q: Write SQL retrieval commands for each of the following queries: Display the course lD and course…
A: Note: As per policy we are entitled to answer the 3 subparts of the question. 1) a. SELECT…
Q: Please see the attached sql function question requiring an sql function to be written to calculate a…
A: alter session set plsql_code_type=native; CREATE FUNCTION mortgage_rate( p_principal…
Q: Write an SQL statement that find and display Warehouseld, Total number of SKU, Summation of…
A: In this question, we have to find out an SQL statement which will display the desired data. We have…
Q: Using the sample "Solmaris Condo" "database" (just a bunch of tables with a theme) I had you create…
A: SAMPLE DATABASE TABLE: OFFICE OFFICE_NUM OFFICE_NAME ADDRESS AREA CITY STATE ZIP_CODE 1…
Q: Write SQL retrieval commands for each of the following queries: Display the course lD and course…
A: Given: Write SQL retrieval commands for each of the following queries: Display the course lD and…
Q: a) Write SQL queries for the following. 1) Display details of those patients whose age is either…
A: The Patient table consists of 4 columns and 8 records. The SELECT clause is used to retrieve the…
Q: In The SQL Oracle Application Using the UNION operator, write a query that displays the…
A: Given:- In The SQL Oracle Application Using the UNION operator, write a query that displays the…
Q: Write the SQL statements for the following User table. User_id Name City Order_date Purchase_amount…
A: To create a table in SQL, create table command is used. Ans 1. The required query is: CREATE TABLE…
Q: tar(name: string, address: string, gender: char, birthdate: date) MovieExec(name: string, address:…
A: Given : SELECT movieTitleFROM StarsIn, MovieStarWHERE starName = name AND birthdate = 1950
Q: Write the SQL statements for the following User table. User_id Name City Order_date…
A: --query to create user tablecreate table user(User_id int primary key,Name varchar(50),City…
Q: Question 11. Write the SQL statement that will implement the relational algebra expressions in the…
A: The queries are given below
Q: Write an SQL statement to display the last name, first name, and email of any owners of cats. Use a…
A: Lets see the solution.
Q: Write SQL queries for the following. Display details of those patients whose age is either 25 or 36…
A: Since you have posted a question with multiple sub-parts, according to the company's policy we will…
Q: Write a SQL statement that will display the product ID, product name, and category only products…
A: In Step 2, an SQL statement is given that will display the product id, product name, and category…
Q: Write a SQL statement to display lowest marks in midterm only in department IT.
A: ANSWER
Q: Write SQL queries for the following statements. 1) Write a stored procedure which takes an integer…
A: Create proc using create command Create a variable as input parameter Declare incrementation…
Q: Before using SQL statements, which objects should be checked if they are null or not and throw…
A: Given that Before using SQL statement which objects should be checked if they are null or not and…
Q: Write an SQL statement to display the last name, first name, and email of any owners of cats with…
A: Given: Write an SQL statement to display the last name, first name, and email of any owners of cats…
Q: Write a PL/SQL Function that accepts 4 integers, 2 representing the homeTeamID and visitorTeamID,…
A: Required: Write a PL/SQL Function that accepts 4 integers, 2 representing the homeTeamID and…
Q: Write a sql query to show first name, job number and department number of those employees whose…
A: The queries for both questions given below
Q: a) Write the standard SQL query to retrieve all information about the customer whose customer number…
A: Here is the Answer and Explanation
Q: Develop a SQL code: The resort manager wants to know the details of the guest who brought their pet…
A: According to given database schema we are required to develop a SQL code to find the guests that…
Q: Write a PL/SQL block that uses searched CASE statement to classify students based on their scores in…
A: The SEARCHED CASE statement is similar to the CASE statement, rather than using the selector to…
Q: We have a single customer with the surname "Ashworth", write the SQL to return the Firstname,…
A: -- create a tableCREATE TABLE customers ( FirstName varchar(255),Surname varchar(255),Phonenumber…
Q: Using the Orders database attached write the SQL Statements for the below cases: Get all the…
A: The answer is in step 2:
Q: Write the SQL code that will produce the same information that was shown in Problem 2, but sorted by…
A: Explanation: Join is a relational operation, which combines the data from two or more tables into…
Q: You have a table Employee(empID,name,salary,dno). Dno is department number to which employee…
A: Algorithm : Step 1 : select the sum of salaries payed for the employees department wise.
Q: Write an SQL statement to create tables with details given below Table: LIBRARY Book_ID Book_Name…
A: Here, We have to create two tables.
Q: Write SQL queries for the following. Display details of those patients whose age is either 25 or 36…
A: SQL is a structured query language, that's is used to extract and manipulate the data from the…
Q: Why may this statement return an error? * Review this SQL Statement: SELECT ename, emp_number,…
A: Why may this statement return an error. SQL statement: SELECT ename, emp_number, salary FROM…
Q: What is the output of the following SQL statement? SELECT name, hcity, pcity, population FROM…
A: FULL JOIN: The function of FULL JOIN is to return the entire tuples of right table and the left…
Q: Write SQL expression to list flight_no and airline_code of all the bookings for customers with first…
A: The given problem is related to SQL Database queries creation where the database is given and the…
Q: Write a SQL statement to create a procedure BONUS_DATA. USING the EMPLYEES table, you have the…
A: First of all, Create an Employees table then update all the values of ( EmployeeId EmployeeFirstName…
Q: sql In the orders table, group by ship_via, employee_id, ship_country fields, where the ship_via…
A: Given table name: orders Field names to display: count of the number of items as total and the…
Q: Write an SQL query display the employee name who's job description is Technical with his/her plan…
A: The query for the above given question is SQL> select ename from emp where job='TECHNICAL'…
Q: Given the following SQL statement, which statement is most accurate?SELECT customer# FROM…
A: SQL statement The given SQL statement is SELECT customer# FROM customers JOIN…
Q: Use this info to answer the question TABLE NAME: students COLUMNS: student-no NUMBER(6) fname…
A: Given Table name: Students Columns to display: studentno, fname, lname Condition: all Female…
Q: Retrieve the PRODUCT_NAME that product UNIT_PRICE less than the 10 (use subque
A: Always specify the tables to get the correct answer Answer
Q: Create a procedure that takes instructor_ID as a parameter. Name it INSTR_SECTIONS. The procedure…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Write SQL code to ensure that the BOOKING_STATUS will only allow the words confirmed, tentative,…
A: Write SQL Code to ensure that the Booking_status will only allow the words…
Q: Write an SQL expression to list the schedule id and booking class of all the bookings for customers…
A: Q: SQL Expression for schedule ids and booking class for John Smith.
Q: Draw the ERD _that is implemented by the following SQL code: CREATE TABLE PROJ_USER USER_ID NUMBER…
A: ER diagram: The ER diagram for the given SQL code:
Q: Given the following relation: Movie (MovieID, Title, Genre, Year) Write a PL/SQL block of code that…
A: Given: Movie (MovieID, Title, Genre, Year) Write a PL/SQL block of code that performs the following…
Q: Instructor(Instructor_Id, Instructor_Name, specialization, Address,#Department_Id)…
A: Given: Instructor(Instructor_Id, Instructor_Name, specialization,…
Q: Write the standard SQL query to retrieve the Name and PhoneNumber of customers whose name beg 'S'.…
A: like is used when you want to fetch records based on some patterns like starting with some letter ,…
Test your Procedure with the following data:
AthleteID= 10, First_Name = ‘Frankie’, Last_Name = ‘Fredricks’, DOB = ’17 June 1975’. Create your SQL statement that will test the
procedure.
EXEC spInsertAthleteDetails @AthleteID= 10, @First_Name = ‘Frankie’, @Last_Name = ‘Fredricks’, @DOB = ’17 June 1975’;
Step by step
Solved in 2 steps
- Write an SQL statement that will insert an order in the orders table with the following data: cutomerID=3, orderDate = current date, shipAmount=20, taxAmount=23.56, shipDate=a week after current date, shipAddressID=3, cardType=2, cardNumber=4123123412341234, cardExpires=05/2024, billingAddressID=3 Write an SQL statement to delete all orders that are created between 2017-06-01 and 2017-06-07.For the table definition below, write a SQL UPDATE statement that changes all annual salaries to monthly salaries. CREATE TABLE Worker ( WORKER_ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, FIRST_NAME TEXT, LAST_NAME TEXT, SALARY DOUBLE, JOINING_DATE DATETIME, DEPARTMENT CHAR(25));Given the following SQL statement, which statement is most accurate?SELECT customer# FROM customersJOIN orders USING(customer#)WHERE shipdate-orderdate IN(SELECT MAX(shipdate-orderdate) FROM ordersWHERE shipdate IS NULL);a. The SELECT statement fails and returns an Oracle error message.b. The outer query displays no rows in its results because the subquery passes a NULLvalue to the outer query.c. The customer number is displayed for customers whose orders haven’t yet shipped.d. The customer numbers of all customers who haven’t placed an order are displayed
- The relationship between CUSTOMER and ORDER is one-to-many. CUSTOMER table has 5 records and ORDER has 15. How many records you will get in the output if you run the following SQL statement? SELECT Customers.CustomerID, Orders.OrderIDFROM Customers, Orders; 5 15 20 75Write SQL statements for following:Student( Enrno, name, courseId, emailId, cellno)Course(courseId, course_nm, duration)i) Add a column city in student table.ii) Find out list of students who have enrolled in “computer” course.iii) List name of all courses with their duration.iv) List name of all students start with „a‟.v) List email Id and cell no of all mechanical engineering studentsI NEED HELP WITH THIS QUESTION FOR MY DATABASE MANAGEMENT CLASS FOR SQL DEVELOPER 5. Now compute Average GPA in each class. Display class_code, Class_GPA. Assume all courses are 3 credit courses. A general formula for GPA would be sum(gradepoints x Hrs)/sum(Hrs). Here you can just take an average of gradepoints as the credit hours are same for all courses.
- This actually didnt work to resolve my problem... Heres what I have so far. CREATE TABLE Horse ( ID SMALLINT UNSIGNED AUTO_INCREMENT, RegisteredName VARCHAR(15), PRIMARY KEY (ID)); CREATE TABLE Student ( ID SMALLINT UNSIGNED AUTO_INCREMENT, FirstName VARCHAR(20), LastName VARCHAR(30), PRIMARY KEY (ID)); -- Your SQL statements go hereThe following two SQL statements will produce the same results. SELECT P_DESCRIPT, P_QOH,P_PRICE FROM PRODUCT WHERE P_QOH >(SELECT P_QOH FROM PRODUCT WHERE P_CODE='11QER/31') AND P_PRICE>(SELECT P_PRICE FROM PRODUCT WHERE P_CODE='11QER/31'); SELECT P_DESCRIPT, P_QOH,P_PRICE FROM PRODUCT WHERE (P_QOH,P_PRICE) > (SELECT P_QOH,P_PRICE FROM PRODUCT WHERE P_CODE='11QER/31'); A) True B) FalseUsing the Orders database attached write the SQL Statements for the below cases: Get all the orders placed by a specific customer. CustomerID for this customer is MAGAA. My answer here is; select * from tblOrders where CustomerID = 'MAGAA'; Show customers whose ContactTitle is not Sales Associate. Display CustomerID, CompanyName, Contact Name, and ContactTitle Show customers who bought products where the EnglishName includes the string “chocolate”. Display CustomerID, CompanyName, ProductID, ProductName, and EnglishName Show products which were bought by customers from Italy or USA. ”. Display CustomerID, CompanyName, ShipCountry, ProductID, ProductName, and EnglishName Show total price of each product in each order. Note that there is not a column named as total price. You should calculate it and create a column named as TotalPrice. Display OrderID, ProductID, ProductName, UnitPrice, Quantity, Discount, and TotalPrice Show how many products there are in each category and show the…
- By using this table answer this question: Write ONE SQL statement which uses the SUBSTR function (as many times as you need to) to extract the following three words: ‘I’, ‘am’, ‘here’ from the string ‘Where am I?’ and put the three words together using a combination of the CONCAT function and the ||. E.g. The starting string used in the SQL statement is: ‘Where am I?’ The output of the SQL statement after we run it will be: TRANS ---------- I am hereIn the SQL Oracle Application Write one query to return the employee_id, job_id, hire_date, and department_id of all employees and a second query listing employee_id, job_id, start_date, and department_id from the job_history table and combine the results as one single output. Make sure you suppress duplicates in the output.Answer the given question with a proper explanation and step-by-step solution. sid name value working hours timestamp 14 temperatureΑΒΒ 47 20 11/10/22015 12:00:00 16 humidityBosch 51 200 11/11/22015 12:00:00 19 temperatureΑΒΒ 41 NULL 11/11/22015 12:00:00 20 temperatureΑΒΒ NULL 30 11/12/22015 12:00:00 Write sql statement that calculates the average temperature for the temperature sensor and it will be showed Write sql statement that will show all the fields of of the table in order not to have duplex values THE NULLS VALUES MUST BE EXCLUDED . PLEASE WRITE THE ANSWER IN PAPER