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 an employee database with two relationsemployee (employee_name, street, city)works (employee_name, company_name, salary) where the primary keys are underlined. Write a function avg_salary that takes a company name as an argument and finds the average salary of employees at thatcompany. Then, write an SQL statement, using that function, to find companieswhose employees earn a higher salary, on average, than the average salary at“First Bank”.WRITE THE CODE OF MYSQL IN PYTHON Create database and tables as given below by using Python. (a) Market database (b) Vendor: vendor_id integer, vendor_name varchar, license_start date, license_end date (c) Item: item_id integer, item_name varchar, item_type varchar, previous_price float, last_sold_date date (d) Auction: auction_id integer, vendor_id integer, item_id integer, price float Choose primary and foreign keys depending on the relations in Market database design.Given the following relational database schema: Student = (SSN, Name, Major) Course = ( CourseNumber, PrerequisiteCourseNumber, Course Title, NumberUnits) Section = ( CourseNumber, Quarter, RoomNumber, DayTime), where DayTime is of the form MW 1:00-2:00PM. Enrollment = (SSN,CourseNumber, Quarter, Grade)// Grade is either Null or a letter grade. Express the following queries using appropriate SQL statements with a minimum number of operations: (a) List the name, SSN and number of courses the student has taken and completed, i.e. received a letter grade (courses with the same CourseNumber taken in different quarters are counted as different courses). (b) List the name, SSN and number of courses the student has taken and completed with a letter grade C or better (courses with the same CourseNumber taken in different quarters are counted as different courses). (c) List the Course Title and CourseNumber which does not have any prerequisite. (d) List the name of every student and SSN who…
- This question is related to the Database:- Suppose you are creating a database for a library management system. Explain how you would make a table for the "books" entity and insert some sample data, and then alter the table to add a new column for the "authorID" attribute and update "authorID" with some data. Finally, make a SQL query to retrieve all the books that were published after the year 2000. Note that this book schema has several columns, including "book_id" as the primary key, "title", "authorN", "publisher", "publication_year", "isbn", "language", and "num_pages". It also includes "available" column that is set to "true" by default and can be used to track the availability of the book. Please don't use handwriting...Suppose that we need to construct an SQLite database containing the below table of details of six pets. Id Name Animal Gender 1 Blue Dog Male 2 Luna Dog Female 3 Mena GuineaPig Female 4 Will GuineaPig Male 5 Ginger GuineaPig Male 6 Squeaks GuineaPig Female Write down the Python code to: • create the SQLite database; • create an appropriate table within the said database; • insert the data into the constructed table (an example suffices).Consider the following sales relational database schema for sales. Item (ItemNo: integer, ItemName:string, type:string) Customer (CID:integer, Cname:string, gender: character{ ’F’-Female, ‘M’-Male}) Sales (SalesID:integer, ItemNo:ineteger, CID:intger, price:double) Write the following queries in SQL. Display ItemName and type for all items bought by female customers. Display SalesID and ItemNo of the item with the lowest price.
- WRITE THE OF MYSQL IN PYTHON, JUST ANSWER THE 2ND QUESTION BY LOOKING AT THE FIRST QUESTION Create database and tables as given below by using Python. (a) Market database (b) Vendor: vendor id integer, vendor name varchar, license start date, license end date (c) Item:itemidinteger,itemnamevarchar,itemtypevarchar, previous price float, last sold date date (d) Auction: auction id integer, vendor id integer, item id integer, price float Choose primary and foreign keys depending on the relations in Market database design. Create arrays of at least 5 di↵erent records. Use these arrays to populate each table in the database.This is my attempt at DBDL statements trying to plan a database in MySQL. Employers: CREATE TABLE Employers ( EmployerID INT PRIMARY KEY, CompanyName VARCHAR(255), Location VARCHAR(255), ContactInfo VARCHAR(255), ); Customers: CREATE TABLE Customers ( CustomerID INT PRIMARY KEY, Name VARCHAR(255), ContactInfo VARCHAR(255), Education VARCHAR(255), Experience INT ); Reference: CREATE TABLE References ( ReferenceID INT PRIMARY KEY, Name VARCHAR(255), ContactInfo VARCHAR(255), RelationshipToCustomer VARCHAR(255) ); Skills: CREATE TABLE Skills ( SkillID INT PRIMARY KEY, SkillName VARCHAR(255), ProficiencyLevel VARCHAR(255) ); EmploymentPositions: CREATE TABLE EmploymentPositions ( PositionID INT PRIMARY KEY, PostionTitle VARCHAR(255), EmployerID INT, Duration VARCHAR(255), FOREIGN KEY (EmployerID) REFERENCES Employers(EmployerID) ); Interviews: CREATE TABLE Interviews ( InterviewID INT PRIMARY KEY, InterviewDate DATE, Interviewer VARCHAR(255), Feedback VARCHAR(255) ); HiringStatus:…Which of the following database operations should be handled with extra care?
- The following query is written in relational algebra.Project[Deposit.aid,Deposit.amount](Select[Deposit.amount>=10000]( Join[aid=aid](Account,Deposit)))Our database system includes the implementation of B+ tree indexes solely. Assume wehave indexes on primary keys of tables and an index on Deposit.amount.Which join algorithm reads less number of pages from the disk: sort-merge join or indexnested loops join?Consider the following database in Prolog:birthday(tom).birthday(fred).birthday(helen),birthday(jack).happy(mary).happy(jane).happy(helen).happy(albert).attendparty(jane).attendparty(helen).hold_party(X): - birthday(X), happy(X) What would be the answer to the following query??- hold party(Who) a. Who = jane.b. Who = mary.c. Who = helen.d. All of the above.e. Who cannot be unified / instantiated.Just return SQL code/query with proper functions for each of the following. No output needed. Database Schema: Beers(name, manf)Bars(name,addr,license)Drinkers(name,addr,phone)Likes(drinker, beer)Sells(bar,beer,price)Frequents(drinker, bar) 1. Find all distinct drinkers whose phone numbers come from area code 917 and who like Budweiser or Bud (synonim!) 2. What beers does Mike like? 3. Which town has the most drinkers? 4. What bars are frequented by drinkers from that town (3)? 5. Provide all bars which serve beers that Mike likes 6. Who likes at least one same beer that Joe or Mike like? 7. All bars which sell at least one beer which is liked by at least one drinker who frequents these bars 8. Drinkers who like some beers sold by Caravan bar 9. Bars which sell Budweiser and are frequented by some drinkers who like Budweiser 10. Bars which are frequented by Mike and Steve 11. Drinker who like at least two beers that Mike likes 12. Bars which sell at least 3 beers that Mike likes (do…