Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SELECT product_name, list_price, list price - 500 AS 'Discount Price WHERE list price > 5000 ORDER BY list_price DESC; Error Code: 1054. Unknown column 'product_name'
SELECT product_name, list_price, list price - 500 AS 'Discount Price WHERE list price > 5000 ORDER BY list_price DESC; Error Code: 1054. Unknown column 'product_name' in 'field list' You don't need a comma after product_name You misspelled SELECT Missing the FROM clause so it doesn't recognize the first column in the list The column product_name can't be in the field list Question 8 SELECT first_name, last_name, phone FROM customer WHERE state=' TX'.city = Houston'; Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ', city = 'Houston" at line 2 Use an AND or an OR between conditions not a comma Use a period between conditions not a comma Use a semicolon between conditions not a comma Use a colon between conditions not a comma Question 9 SELECT shipped_date, DATE_FORMAT(DATEADD(shipped_date, INTERVAL 2 MONTH). '%c/ %e %') AS '2 months after shipped FROM cust_order: 1 Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '), '%c/%e/%Y') AS '2 months after shipped' FROM cust_order' at... The function name should be DATEDIFF You can't have slashes '/' in the date pattern string You don't need single quotes around %c/%e/% The function is DATE_ADD not DATEADD
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started