3. Increase by 8% the credit limit of each employee whose credit limit is below
ID: 3678188 • Letter: 3
Question
3. Increase by 8% the credit limit of each employee whose credit limit is below average
UPDATE employee
SET Emp_CreditLimit = Emp_CreditLimit * 1.08
WHERE Emp_CreditLimit < (SELECT AVG(Emp_CreditLimit) FROM employee)
THIS STATEMENT IS INCORRECT. ANY IDEA ABOUT THIS QUESTION?
New class SELECT FO employee New department employee Profling [ Edit inline ] [ Edit] Explain SQ tem Show all Number of rows: 25 Filter rows: Search this table lunch lunch item Sort by key: None supplier i-! information-schema + Options Emp ID Emp_FirstName Emp_LastName Dept_Code Emp_HireDate Emp_CreditLimit Emp_Phone Emp_MgrID NULL 201 201 202 202 201 203 203 201 203 + mysql Brown Kern Woods 3484 8722 7591 6830 5286 3829 2259 1752 3357 2974 EditCopy Delete 201 Susan 1992-06-01 00:00:00 30.0000 1995-08-15 00:00:00 26.0000 1997-02-01 00:00:00 25.0000 1996-07-01 00:00:00 15.0000 1998-03-01 00:00:00 25.0000 1997-10-15 00:00:00 15.0000 1996-12-01 00:00:00 25.0000 1997-04-01 00:00:00 25.0000 1998-03-17 00:00:00 15.0000 1996-02-15 00:00:00 25.0000 +_ 1 performance-schema xe 202 Jim Sal Shp Sal Sal Act vp Edit Copy Delete OG, EditCopy Delete 203 Martha Owens Perkins Rose Smith Campbell Jacobs Hoffman Edit Copy e Delete 204 Ellen OG, Edit Copy Delete 205 Henry vp Edit Copy Delete 206 Carol Shp Shp Mkt Sal EditCopy Delete 207 Dan EditCopye Delete Edit Co 208 Fred 209 Paula 210 Nancy OG, EditCopy @> Delete vp Edit Copy Delete Check allExplanation / Answer
You can alos use in this way
WHERE Emp_CreditLimit < ( SELECT AVG(e.Emp_CreditLimit) FROM employee as E)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.