Write the following queries in the WPC database and save these queries as Query 15 and Query 16 respectively.
A.
Select ProjectID,ProjectName,Depatment,DepartmentPhone from Projects inner join Departments on Projects.DepartmentId = Departments.DepartmentId where Department = 'Finance';
B.
Select EmployeeNumber,FirstName,Lastname from Employees where EmployeeNumber >= 3 and EmployeeNumber <= 9 and LastName LIKE '%on%'
Do ask if any doubt. Please upvote.
Write the following queries in the WPC database and save these queries as Query 15 and...
For this set of Review Questions, we will create and use a database for the Wedgewood Pacific Corporation (WPC) that is similar to the Microsoft Access database we created and used in Chapters 1 and 2. Founded in 1957 in Seattle, Washington, WPC has grown into an internationally recognized organization. The company is located in two buildings. One building houses the Administration, Accounting, Finance, and Human Resources departments, and the second houses the Production, Marketing, and Information Systems departments. The...
j. Create a SQL query based on tblTransaction and tblEmployees that will display all the fields from tblTransaction and the FirstName and LastName fields from tblEmployees. Use a join to include all employees, regardless if they have sold any products. Sort in ascending order by the employee’s first name and last name. Save your query as qryEmpTransaction_initialLastname, and then close the query. Feilds from tbl Transaction are TransactionID, CustomerID, EMployeeID, TransactionDate, MethodOfPayment Feilds from tbl Employees are EmployeeID, FirstName, LastName,...
Problem 33, chapter 7 from Database Systems 13th edition by Coronel Write a query to display the employee number, last name, email address, title, and department name of each employee whose job title ends in the word “ASSOCIATE.” Sort the output by department name and employee title Problem 36, chapter 7 from Database Systems 13th edition by Coronel Write a query to display the number of products within each base and type combination, sorted by base and then by type...
Using the database: Write SQL queries for each of the questions
below.
1. Find the media type which
has 100 or more tracks. Print the name of such media type. Number
of rows returned in the result = 3
A) Find the playlists which have one or more tracks that have
never been purchased in California (CA). Print the Id, and the name
of such playlists. Number of rows returned in the result = 18
B) Find the customers who...
2) Consider the database schema on the relations (where key attributes have been underlined): PROJECTS(Number, Department, ProjectName) EMPLOYEES(Number, Surname, FirstName, Department) ALLOCATIONSEmplovee, Project, Function, Date) NOTE: relation ALLOCATIONS stores the registration number (attribute Employee) of employees that are assigned to a given project (attribute Project is the number of the project, not the name of the project), the function the employee has in that project (i.e., technician, manager, etc.) and the date when the employee has been assigned to that...
2. SQL queries (40 points total, 5 points each query) Write SQL query statements to query the following Hotel Room Booking Database Tables. "cid" is Customer ID. "rid" is Room ID. "bid" is Booking ID. "dob" means Date of Vwwww Birth; "beds" means the number of beds in the room which is normally 1 or 2 beds. "DueDate" and "DueAmount" are the payment due dates and due amounts of this booking. Customers fname name phone email cid dob zipcode Rooms...
Using the following data to create various queries below. Database is Pensacola Healthcare Facility(FacilityID, SuborgID, Addr) Provider(ProviderID, FirstName, LastName, NPI, FacilityID) Patient(PatientID, FirstName, LastName, Addr) Appointment (AppointmentID, ApptTime, ProviderID, PatientID, FacilityID) 1. Write a query displaying all patients 2. Write a query showing all appointments for a patient with an ID of 2. 3. Write a query in DESC order of Addr for all facilities. 4. Write a query showing all Providers with name LIKE Smith. 5. Write a query...
EXERCISE Provide working SQL DML statements for the following database schema and queries CUSTOMER (ID, Type, Firstname, Lastname, Address, City) INVENTORY(ID, ItemName, Type, MadeInStore, SupplierName, DailyAverageSold, Price) ORDERS(ID, Customer_FK, Item_FK, Quantity, DeliveryDate) 16. Find the total amount due for each order, where the total is at least $70 . Show: order id, lastname, and total-amount . Hint: variation of previous query 17. Find the total amount due for each order placed by a customer that is a restaurant owner, total...
HELP DATABASE QU
Question 1: Think About the relational database table data as given below, write the following queries in Oracle SQL. Company (Cid, Cname, City, Budget, Branch) Department (Deptno, Dname, Building, Cname) Employee (Ename, Deptno, Street, City, Phone, Salary) Works (Ename, Deptno, Hire_date) Location (Cname, Location ) 1. Write Query to Create the Company table, suggest appropriate data type of each attribute, consider that there should be a name for each company. 2. Find employee name/names who live in...
Consider EMPLOYEE database. Create the database and run the
following queries and write the result you get.
What would be the result of the following query (please create
the resulting table will all the columns and rows)?
SELECT
D.Dname, E.Lname, P.Pname
FROM
DEPARTMENT D, EMPLOYEE E, WORKS_ON W, PROJECT P
WHERE
D.Dnumber=E.Dno AND E.Ssn=W.Essn AND W.Pno=P.Pnumber
ORDER BY
D.Dname DESC,
E.Lname DESC;