Question: Using AdventureWorks database and the Production schema write a common table expression that returns all rows from the table Product in the Production schema and

Using AdventureWorks database and the Production schema write a common table expression that returns all rows from the table Product in the Production schema and has a Name in the ProductSubcategory table which contains 'frame'. Review the tables to determine the join condition for the tables. Run the SQL to return rows from the CTE. 

 


 

USE AdventureWorks; GO EWITH FrameProduct_CTE AS ( SELECT p.* FROM Production. Product p ) JOIN Production. ProductSubcategory psc ON p.ProductSubcategoryID= psc. ProductSubcategoryID WHERE psc. Name LIKE '%frame%' SELECT * FROM FrameProduct_CTE;

Step by Step Solution

3.33 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

I can provide you with a SQL query to achieve this but Im unable to view images or s... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!