SELECT P.BRAND_ID, B.BRAND_NAME, B.BRAND_TYPE,MAX(AVGPRICE) FROM LGPRODUCT P INNER JOIN LGBRAND B ON P.BRAND_ID = B.BRAND_ID (SELECT P.BRAND_ID, AVG (P.PROD_PRICE) AS AVGPRICE  FROM LGPRODUCT P  GROUP BY P.BRAND_ID)AS AVG_PRICE GROUP BY P.BRAND_ID, B.BRAND_NAME, B.BRAND_TYPE   ERROR 1064 (42000) at line 1: 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 'SELECT P.BRAND_ID, AVG (P.PROD_PRICE) AS AVGPRICE FROM LGPRODUCT P GROUP BY P.' at line 3

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter8: Advanced Sql
Section: Chapter Questions
Problem 2RQ: What three join types are included in the outer join classification?
icon
Related questions
Question
SELECT P.BRAND_ID, B.BRAND_NAME, B.BRAND_TYPE,MAX(AVGPRICE)
FROM LGPRODUCT P INNER JOIN LGBRAND B ON P.BRAND_ID = B.BRAND_ID
(SELECT P.BRAND_ID, AVG (P.PROD_PRICE) AS AVGPRICE 
FROM LGPRODUCT P 
GROUP BY P.BRAND_ID)AS AVG_PRICE
GROUP BY P.BRAND_ID, B.BRAND_NAME, B.BRAND_TYPE
 
ERROR 1064 (42000) at line 1: 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 'SELECT P.BRAND_ID, AVG (P.PROD_PRICE) AS AVGPRICE FROM LGPRODUCT P GROUP BY P.' at line 3
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781285196145
Author:
Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning