Question

In: Computer Science

Rewrite the following SELECT statement. In the rewrite change the join operator style on the Facility...

Rewrite the following SELECT statement. In the rewrite change the join operator style on the Facility table to a Type I nested query. (10 points)

SELECT eventplan.planno, eventrequest.eventno, workdate,activity

FROM eventrequest, eventplan, Facility

WHERE eventplan.workdate BETWEEN '2018-12-01' AND '2018-12-31' AND eventrequest.eventno = eventplan.eventno AND EventRequest.FacNo = Facility.FacNo AND facname = 'Basketball arena';

Rewrite the following SELECT statement. In the rewrite change the join operator style on the Facility and Employee tables to a Type I nested queries. (15 points)

SELECT DISTINCT eventrequest.eventno, dateheld, status, estcost

FROM eventrequest, employee, facility, eventplan

WHERE eventplan.workdate

BETWEEN '2018-10-01' AND '2018-12-31' AND eventplan.empno = employee.empno AND eventrequest.facno = facility.facno AND facname = 'Basketball arena' AND empname = 'Mary Manager' AND eventrequest.eventno = eventplan.eventno;

Solutions

Expert Solution

Short Summary:

  • Provided the rewitten queries as per the requirement.

SOLUTION:

Rewrite the following SELECT statement. In the rewrite change the join operator style on the Facility table to a Type I nested query.

SELECT eventplan.planno, eventrequest.eventno, workdate,activity
FROM eventrequest
INNER JOIN eventplan ON eventrequest.eventno = eventplan.eventno
INNER JOIN Facility ON EventRequest.FacNo = Facility.FacN
WHERE eventplan.workdate BETWEEN '2018-12-01' AND '2018-12-31'
AND facname = 'Basketball arena';

Rewrite the following SELECT statement. In the rewrite change the join operator style on the Facility and Employee tables to a Type I nested queries.

SELECT DISTINCT eventrequest.eventno, dateheld, status, estcost
FROM eventrequest
INNER JOIN employee ON eventplan.empno = employee.empno
INNER JOIN facility ON eventrequest.facno = facility.facno
INNER JOIN eventplan ON eventrequest.eventno = eventplan.eventno
WHERE eventplan.workdate BETWEEN '2018-10-01' AND '2018-12-31'
AND facname = 'Basketball arena'
AND empname = 'Mary Manager' ;

**************************************************************************************

Feel free to rate the answer and comment your questions, if you have any.

Please upvote the answer and appreciate our time.

Happy Studying!!!

**************************************************************************************


Related Solutions

A. Rewrite the query select * from section natural join classroom without using a natural join...
A. Rewrite the query select * from section natural join classroom without using a natural join but instead using an inner join with a using condition. B. Explain the difference between integrity constraints and authorization constraints.
Write a SELECT statement that returns these columns using a JOIN of three tables: order_date from...
Write a SELECT statement that returns these columns using a JOIN of three tables: order_date from the orders table shipped_date from the orders table order_qty from the order_details table title from the items table artist from the items table unit_price from the items table Result table should be in order of order_date in ascending order
Fill in the blanks to rewrite the following statement: There is a positive integer that is...
Fill in the blanks to rewrite the following statement: There is a positive integer that is less than or equal to every positive integer. (a) There is a positive integer m such that m is . (b) There is a such that every positive integer. (c) There is a positive integer m which satisfies the property that given any positive integer n , m is
/*explain */ Select * From Student join enrollment on student.ID = enrollment.Student_ID             join section on...
/*explain */ Select * From Student join enrollment on student.ID = enrollment.Student_ID             join section on section.ID = enrollment.section_ID             join department on major = department.name             join faculty on faculty.id = section.faculty_ID             join address on address.id = student.address_ID             join Course on section.course_Number = course.course_number and section.dept_id = course.dept_ID Where --we want to make sure we have name information for students if we want to reach out to them Student.Name_Last Not Like ('') -- the theater department has...
Rewrite the following text using the correct tone and style to create goodwill. I am writing...
Rewrite the following text using the correct tone and style to create goodwill. I am writing to you because I want to complain about the horrible service that I endured during my stay at your hotel last weekend. The porter took such a long time to send my luggage up to my room and he even dared to ask me for a tip. The air-conditioner was also very noisy, and I could not have my beauty sleep which is very...
Problem set Rewrite the following if statement as an equivalent switch statement. The variable digit is...
Problem set Rewrite the following if statement as an equivalent switch statement. The variable digit is of type int. if (digit == 0) value = 3; else if (digit == 1) value = 3; else if (digit == 2) value = 6; else if (digit == 3)     value = 9; The decision table below shows fines imposed for speeding violations. Write a code segment that assigns the correct fine to type double variable fine based on the value of...
You can join tables using the WHERE clause, the EXISTS operator, or the IN clause. Which...
You can join tables using the WHERE clause, the EXISTS operator, or the IN clause. Which one is the easiest for you to understand? Why? The OR and AND operators are used in compound conditions. Is there any relationship between these operators and the ALL and ANY operators?
Answer whether the following statement is TRUE or FALSE. If FALSE, rewrite the sentence to be...
Answer whether the following statement is TRUE or FALSE. If FALSE, rewrite the sentence to be TRUE. (15 pt) A. Reproducible set of DNA fragments will be produced every time a restriction endonuclease digests a known piece of DNA. B. Restriction nucleases recognize and cut specific sequences on single-stranded DNA. C. The larger the genome of the organism from which a library is derived, the larger the fragments inserted into the vector will tend to be. D. Ligation reactions by...
Please write a C++ program. Please rewrite your Array (including the operator overloading) into a template....
Please write a C++ program. Please rewrite your Array (including the operator overloading) into a template. And rewrite your main function to test your template for integer array and double array. Following is my complete code: #include <iostream> using namespace std; class Array { private: // Pointer to memory block to store integers int* data; // Maximum size of memory block int cap; // Stores number of integers in an array int num; public: // Constructor Array(int size); // Default...
Solving Logarithms using the Change of Base Formula Use the change of base formula to rewrite...
Solving Logarithms using the Change of Base Formula Use the change of base formula to rewrite the logarithm using base 10 logarithms. Then use your calculator to evaluate the logarithm. Round your result to three decimal places. Logarithmic Function Rewritten using the change of base formula Evaluated using the calculator f(x)=log2(x)f(x)=log2(x) f(8)=log2(8)=log(8)log(2)f(8)=log2(8)=log(8)log(2) f(8)=3f(8)=3 h(x)=log8(x)h(x)=log8(x) h(23)=h(23)=    =    h(23)=h(23)= p(t)=15log9(t)p(t)=15log9(t) p(158)=p(158)=    =    p(158)=p(158)= f(x)=18+log4(x)f(x)=18+log4(x) f(151)=f(151)=    =    f(151)=f(151)=
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT