Reputation: 17
I know how to create and use view but struggling with it's use case, in real projects where do sql view fits?
**Create a view: **
CREATE VIEW [Products Above Average Price] AS
SELECT ProductName, Price
FROM Products
WHERE Price > (SELECT AVG(Price) FROM Products);
**use a view: **
SELECT * FROM [Products Above Average Price];
Upvotes: 0
Views: 20