The aim of assignment 1 is to implement a database schema and execute different types of SQL queries in Oracle SQL developer.
Q: The HR department needs the following reports: 4. Find the highest, lowest, sum, and average salary…
A: Below are the required SQL queries:
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: Assignment : PL/SQL Practice Note: PL/SQL can be executed in SQL*Plus or SQL Developer or…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Imagine a student table with following columns: Student(Stuid, Name , Age, Major) Write a…
A: given table Student Stuid Name Age Major
Q: Use the following table to find the OUTPUT of the following SQL queries: Table Name: Patients…
A: COALESCE returns the first non null value in the list. Here in the fax column, the blood_type is A…
Q: Write the T-SQL scripts for the following tasks: Write a query to select the employees whose…
A: Please refer to the following step for the complete solution of the problem above.
Q: In Sql Oracle Apex application, Using GROUPING SETS, write a query to show the following groupings:…
A: First query performs a grouping on two columns Department_Id and Job_Id Group By X, Y means put all…
Q: Database course: Write SQL queries to do the following A. List names of IT students.…
A: The SQL queries are given in step 2.
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 sample sql quiries for these Write a query to display employee number, first name, job id…
A: Please refer below for your reference: Queries are: 1. SELECT employee number, first name, job id…
Q: 3. Modify p2ql.sql to display the name and salary for all employees whose salary is not in the range…
A: 4. SELECT ENAME,JOB,HIREDDATE FROM EMPLOYEE WHERE HIREDDATE BETWEEN #20/2/1981 AND #1/5/1981…
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: 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 the T-SQL scripts for the following tasks: Write a query to select the count of employees…
A: SELECT COUNT(*)FROM employees_tableWHERE department = "Marketing";
Q: SQL QUERIES Employees(EMPLOYEE_ID,FIRST_NAME,LAST_NAME,EMAIL,PHONE_NUMBER,HIRE_D…
A: Write a query in SQL to display the HIRE_DATE of every employee in following format.Format:…
Q: 6. Write the SQL code to validate the ASSIGN_CHARGE values in the ASSIGNMENT table. Your query…
A: The first query should validate the the ASSIGN_CHARGE values in the ASSIGNMENT table. ASSIGN_CHARGE…
Q: SQL queries
A: According to the question, we need to write the SQL queries of the following questions: Write a…
Q: Write an sql query to show country code, country name of those employees whose country name…
A: Please refer below for your reference: Queries: 1.SELECT country code, country name FROM employees…
Q: Assume the following tables: Student (studid, email, name) Club (clubid, telephone, name,…
A: Assume the following tables: Student (studid, email, name) Club (clubid, telephone, name,…
Q: lease implement the following using Oracle live/SQL Developer: 1- Create the DONORS table with the…
A: please do upvote for my efforts ! answer: 1) CREATE TABLE DONORS( donor_id int primary key,…
Q: Write a SQL query to fetch the different projects available from the EmployeeSalary table. Write a…
A: Question 1. Write a SQL query to fetch the different projects available from the EmployeeSalary…
Q: Create table sales ( cust varchar(20), prod varchar(20), day integer, month integer, year integer,…
A: Answer
Q: QL QUERIES Employees(EMPLOYEE_ID,FIRST_NAME,LAST_NAME,EMAIL,PHONE_NUMBER,HIRE_D…
A: To write a query in SQL for the above criteria. 1.SQL Min() and Max() functions are used to find the…
Q: Create a PL/SQL query to display the combined customer name, coin purchased, coin price andthe…
A: THE GIVEN SQL QUERRY FOR THE QUESTION
Q: Write the following inserts, deletes, or updates in SQL, using the universityschema. Insert every…
A: Explanation: In the below query, “insert, select, into, from and where” are the keywords used. The…
Q: List doctor’s details where speciality is either Dermatology or Neurology. (Use INoperator). List…
A: The given requirement is to be solved in database SQL where the DOCTOR table is already created with…
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: Please help with the following: Using oracle sql live or sql developer what sql statements could be…
A: 1.List all the rows in which the prescription dates occur on or after November 14. SELECT * FROM…
Q: Use SQL Developer or Oracle Live SQL to write the appropriate SQL commands as follows: )…
A: Below is the required procedure:
Q: Assume that you have these 5 tables.. Answer this question by using those tables. Please. Create in…
A:
Q: 5) Write an SQL Query to display the accountno, name, Recurrent_acno, amount whose fixed deposit…
A: Required:
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: ed all possible SQL queries to perform this relational schem
A: Approach: 1- In this assignment, I have written five different - different SQL queries.2- Where…
Q: Write queries in SQL to answer each of the following questions:…
A: Below are the required queries: As per our company guidelines we are supposed to answer only first 3…
Q: 6. Write an SQL query to display the ID, ITEMNAME, CUSTOMERNAME and price is not equal 35000 and…
A: As per Bartleby's guidelines “Since you have posted a question with multiple sub-parts, we will…
Q: Write the SQL code to validate the ASSIGN_CHARGE values in the ASSIGNMENT table. Your query should…
A: UPDATE ASSIGNMENT SET CALC_ASSIGN_CHARGE = ASSIGN_CHG_HR* ASSIGN_HOURS;
Q: Employees(EMPLOYEE_ID,FIRST_NAME,LAST_NAME,EMAIL,PHONE_NUMBER,HIRE_D…
A: SELECT * FROM employees WHERE salary > ALL(SELECT avg(salary)FROM employees GROUP BY…
Q: . Write SQL retrieval commands for each of the following queries: a. Display the course ID and…
A: Actually, SQL stands for Structured Query
Q: PL/SQL program to create a cursor and to display all the records from student table
A: Step to create cursor: Declare cursor Open cursor Fetch record from cursor Close cursor
Q: es in relational algebra. Find the username of users who are from ‘Muscat’. Find the IDs of pictures…
A: 1. Find the username of users who are from ‘Muscat’ SELECT username FROM users where place='Muscat'…
Q: SQL QUERIES Employees(EMPLOYEE_ID,FIRST_NAME,LAST_NAME,EMAIL,PHONE_NUMBER,HIRE_D…
A: As the database is not mentioned, I am using MYSQL. Create the table employee. Here sys is the…
Q: Use the following table to find the OUTPUT of the following SQL queries: Table Name: Patients…
A: The SQL stands for Structured Query Language.Structured Query Language is used to communicate with a…
Q: Write queries in SQL to answer each of the following questions: 1. Find all students in Comp.…
A: SQL is a standard language for storing, manipulating and retrieving data in databases.
Q: In sql get to know the HR database, its tables, and their contents. Show the SQL query and the…
A: SQL stands for Structured Query Language. SQL is a database computer language designed for the…
Q: Write the following inserts, deletes, or updates in SQL, using the universityschema. Increase the…
A: To change the records that are already existed in a table, the “UPDATE” statement is used. The…
Q: 12. Display the name, job, and salary for all employees whose job is Clerk or Analyst and their…
A: Use in operator to check for multiple values and not in to exclude values. Use all operator where…
Q: 5. Write a SQL query to find the maximum, minimum, and average salary of the employees. 6. Write an…
A: Given, Table EmployeeDetails: EmpId FullName ManagerId DateOfJoining City 121 John Snow 321…
Q: Instructor(Instructor_Id, Instructor_Name, specialization, Address,#Department_Id)…
A: Given: Instructor(Instructor_Id, Instructor_Name, specialization,…
Q: SQL Database Write PL/SQL or T-SQL procedures to accomplish the following tasks: Obtain the…
A: Note: As per our company guidelines we are supposed to answer only first 3 sub-parts. Kindly repost…
Write the appropriate SQL query for each of the following questions:
- Display the number of students acting in ‘Radio Club’
- Display the sum of fees of activities organized by the IT club
Step by step
Solved in 2 steps with 1 images
- Consider the following schema for a company database and answer the following questions: DEPARTMENT Dname Dnumber Mgr_ssn Mgr start date M EMPLOYEE Fname Minit Lname Ssn Bdate Address Sex Salary Dno M WORKS ON Essn Pno Hours M PROJECT Pname Pnumber Plocation Q1//create all tables of this schema and apply any necessary constraints Q2// Write SQL statements that carry out the following tasks: 1-alter the employee table to add column city of 20 characters. 2- alter the employee table to apply the following business rule The minimum salary is 3000 and maximum salary is 10000 3- insert sample data in each table. 4- display a list of each employee SSN , Name and Salary. 5- display a list of each employee SSN, Name and Salary for employees working in department no 2.Consider the following schema for a company database and answer the following questions: DEPARTMENT Dname Dnumber Mgr_ssn Mgr_start_date M EMPLOYEE Fname Minit Lname Ssn Bdate Address Sex Salary Dno WORKS ON Essn Pno Hours M PROJECT Pname Pnumber Plocation Q1//create all tables of this schema and apply any necessary constraints Q2// Write SQL statements that carry out the following tasks: 1-alter the employee table to add column city of 20 characters. 2- alter the employee table to apply the following business rule The minimum salary is 3000 and maximum salary is 10000 3- insert sample data in each table . 4- display a list of each employee SSN, Name and Salary. 5- display a list of each employee SSN , Name and Salary for employees working in department no 2.Task 1: The InstantRide Management team founded a new team for car maintenance. The new team is responsible for the small maintenance operations for the cars in the InstantRide system. The main idea is to take actions faster and minimize the time spent for the maintenance. Therefore, the Car Maintenance team wants to store MAINTENACE_TYPE_ID (char(5)) and a MAINTENANCE_TYPE_DESCRIPTION (varchar(30)) in the database. Using MAINTENANCE_TYPE_ID as the PRIMARY KEY, create a new table, MAINTENANCE_TYPES, and send the table description with the column names and types to the Car Maintenance team. Task 2: The Car Maintenance team also wants to store the actual maintenance operations in the database. The team wants to start with a table to store CAR_ID (CHAR(5)), MAINTENANCE_TYPE_ID (CHAR(5)) and MAINTENANCE_DUE (DATE) date for the operation. Create a new table named MAINTENANCES. The PRIMARY_KEY should be the combination of the three fields. The CAR_ID and MAINTENACNE_TYPE_ID should be foreign…
- Task 1: The InstantRide Management team founded a new team for car maintenance. The new team is responsible for the small maintenance operations for the cars in the InstantRide system. The main idea is to take actions faster and minimize the time spent for the maintenance. Therefore, the Car Maintenance team wants to store MAINTENACE_TYPE_ID (char(5)) and a MAINTENANCE_TYPE_DESCRIPTION (varchar(30)) in the database. Using MAINTENANCE_TYPE_ID as the PRIMARY KEY, create a new table, MAINTENANCE_TYPES, and send the table description with the column names and types to the Car Maintenance team.Task 1:The InstantRide Management team founded a new team for car maintenance. The new team is responsible for the small maintenance operations for the cars in the InstantRide system. The main idea is to take actions faster and minimize the time spent for the maintenance. Therefore, the Car Maintenance team wants to store MAINTENACE_TYPE_ID (char(5)) and a MAINTENANCE_TYPE_DESCRIPTION (varchar(30)) in the database. Using MAINTENANCE_TYPE_ID as the PRIMARY KEY, create a new table, MAINTENANCE_TYPES, and send the table description with the column names and types to the Car Maintenance team. THIS IS FOR CENGAGE MYSQL1. Create a PL/SQL function. The minimal requirements: using the cursor in PLSQL function, retrieve data from object table and record the data in the PL/SQL table, make calculations with object data and define return value of the function, test the operation of the function (get the result). The maximal requirements: you can add IF-ELSEIF's, cursor processing in loops, more interesting semantic functions. 2. Create methods for object types. The minimal requirements: use map/order methods (1 method) (method+ demonstration), use MEMBER methods (2 methods) (methods + demonstration). The maximal requirements: non-trivial methods, that use more complex comparisons or do more complex calculations – i.e., give a couple more constructs in code. 3. Demonstrate the multiset operators. The minimal requirements: using 2 different multiset operators (can be included in the code), they can also be used in the The maximal requirements: the queries make sense semantically, one of the queries is a…
- name PERSON address salary fee EMPLOYEE STUDENT thesis RESEARCH TEACHING POST GRAD UNDER GRAD Year = 4 FINAL YEAR LECTURER TUTOR SUPERVISOR project courseno PART II: University Database in MYSQL • Create a database and its tables and constraints based on the relational model of PART I. • You can use my slides and any other resources to complete this exercise. • Submit the SQL statements you used to create the database and its tables (you can copy/paste directly from the mysql console).Let's wa(k through a review of basic SQL syntax, using as an example the database that was mentionedearlier. This database has the following simple structure(* indicates a primary key):Courses: CourseID*, CourseName, TeacherIDTeachers: TeacherID*, TeacherNameStudents; StudentID*, StudentNameStudentCourses: CourseID*, StudentID*Using the above table, implement the following queries.Query 1: Student Enrollment Query 2: Teacher Class Sizebranch(branchhame, branch+citysassets} customer (HD, Customer name, customer street, customer city) loan loan number branch_name, amounty borrower(ID; loan_number account (account_number, branch name, balance)e depositor (HDs account number)- Figure le Consider the bank database in Figure 1, where the primary keys are underlined. Each branch might have many loans or accounts, associated with borrowers or depositors, respectively. Construct the following SQL queries for this relational database. 1. Find the name of each branch that has at least one customer who has an account in the bank and who lives in the "Harrison" city. Make sure each branch name only appears once. 2. Find the ID of each customer who lives on the same street and in the same city as customer "12345". (1) Please use "tuple variables". e (2) Please use "derived relations" or “with". 3. Find the ID of each customer of the bank who has an account but not a loan. 4. Find the total sum of all loan amounts for each branch…
- Q2: Design Database for the following scenario and Write SQL queries. Create an ERD for the following scenario. Suppose there is a grocery store near your house. Following can be considered for ERD: A grocery store may have more than one employee. A grocery store has exactly one manager. The manager has one or more sales men working under him. Grocery store has more than one portion for the products. • Each product has a barcode, name, expired date. Many customers can busy many products, but each product is bought by only one customer. Each customer will get an invoice for his /her purchase. The bill invoice has an id.3. The following relational schema form a university database which is implemented in a relational database: student (s ID, s_name, semester, year) department(d_ID, d_name, floor) course (c_code, c_title, d_ID, credits) Write down the SQL commands for the following queries: a) Find the titles of all courses from your own CSE department using subquery. b) Show the department names starting with “C" and ending with “g". c) Sort the number of courses for each department in a descending order. d) Insert your own information into the student table.For the following database scheme Employee(empNo,fName.IName.address.DOB.sex,position.deptNo) Department(deptNo.deptName,mgrEmpNo) Project(projNo.projName,deptNo) WorksOn(empNo.projNo.dateWorked,hoursWorked) Write an SQL statement to find all the details of employees who are female