Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

UPDATE MAINTENANCE_LOG SET LASTSERVICEDATE = 2021 -08 -06, NEXTSERVICEDATE = 2022 -08 -06 WHERE MAINTENANCE_LOG Error Code: 1054. Unknown column 'MAINTENANCE_LOG' in 'where clause' I

UPDATE MAINTENANCE_LOG SET LASTSERVICEDATE = 2021 -08 -06, NEXTSERVICEDATE = 2022 -08 -06 WHERE MAINTENANCE_LOG

Error Code: 1054. Unknown column 'MAINTENANCE_LOG' in 'where clause' I need to complete all the following steps below. Please help ME! image text in transcribedThis are my table I created.

CREATE TABLE `Employee`( `EmployeeID` INT NOT NULL, `First_Name` VARCHAR(45) NOT NULL, `LastName` VARCHAR(45) NOT NULL, `StartDate` DATE NOT NULL, `EndDate` DATE, `HourlyWage` DECIMAL(10,2) NOT NULL, `HoursWorked` INT, `IsPayroll` TINYINT NOT NULL, PRIMARY KEY (`EmployeeID`));

CREATE TABLE `Maintenance_Log`( `ApplianceID` INT NOT NULL, `ApplianceName` VARCHAR(45) NOT NULL, `ServiceBy`INT NOT NULL, `LastServiceDate` DATE NOT NULL, `NextServiceDate` DATE, PRIMARY KEY (`ApplianceID`), CONSTRAINT `ServiceBy` FOREIGN KEY (`ServiceBy`) REFERENCES `Employee`(`EmployeeID`) );

CREATE TABLE `MenuItemPrep`( `BatchID` INT NOT NULL, `Name` VARCHAR(45) NOT NULL, `Flavor` VARCHAR(45) NOT NULL, `Count` INT NOT NULL, `ExpirationDate` DATE NOT NULL, `PreparedBy` INT NOT NULL, PRIMARY KEY (`BatchID`), CONSTRAINT `PreparedBy` FOREIGN KEY (`PreparedBy`) REFERENCES `Employee`(`EmployeeID`) );

This is my insert to

INSERT INTO Employee (EmployeeID, First_Name, LastName, StartDate, EndDate, HourlyWage, HoursWorked, IsPayroll) VALUES (9378, 'Joshua', 'Price', '2015-10-12', NULL, 25.00, 40, 0), (9379, 'Tasha', 'Brown', '2018-08-09', NULL, 20.00, 40, 1), (9380, 'Jaime', 'Davis', '2020-11-05', '2021-01-01', 16.00, 0, 0), (9381, 'Jimmy', 'Brown', '2021-06-26', NULL, 11.00, 15, 0);

INSERT INTO Maintenance_Log (ApplianceID, ApplianceName, ServiceBy, LastServiceDate, NextServiceDate ) VALUES (2005, 'Barista Machine', 9378, '2021-08-06', '2021-08-06'), (2006, 'Hot Water Dispenser', 9380, '2020-12-31', '2022-12-31'), (2007, 'Blender Machine', 9381, '2019-05-21', '2019-05-21');

INSERT INTO MenuItemPrep (BatchID, Name, Flavor, Count, ExpirationDate, PreparedBy) VALUES (7578, 'Iced Coffee', 'Caramel', 10, '2019-03-11', 9378), (7579, 'Chocolate Syrup', 'Chocolate', 20, '2020-05-17', 9378), (7580, 'Hot Coffee', 'Mocha', 10, '2021-10-21', 9381), (7581, 'Pastry', 'Almond', 5, '2022-12-19', 9378);

Margie should be able to stay on top of the blender maintenance now that she recorded it. Update Maintenance_Log SET Maintenance_Log.LastServiceDate = '2022-03-08', Maintenance_Log.NextServiceDate = ' 20229311 ' WHERE Maintenance_Log.ApplianceName = 'Blender'; A week later and they onboarded a new barista! He's excited to work with the team and the happy they don't have their plates full and they're working normal hours now. INSERT INTO 'Employee' ( EmployeeID', 'FirstName', 'LastName', 'StartDate', 'EndDate', 'HourlyWage', 'Hoursworked', 'IsPayrol1') VALUE ' 'Shia', 'Arton', '2022-03-14', NULL, 16.00, '10', '); UPDATE Employee SET Employee. Hoursworked =40 WHERE Employee. EmployeeID = ' 3379 '; UPDATE Employee SET Employee. HoursWorked =40 WHERE Employee. EmployeeID = ' 3381 '; A few months in the future

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals, Design, and Implementation

Authors: David M. Kroenke, David J. Auer

14th edition

133876705, 9781292107639, 1292107634, 978-0133876703

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago