Check out example codes for "creating view in sql". It will help you in understanding the concepts better.

Code Example 1

CREATE VIEW view_name AS

SELECT column1, column2, ...

FROM table_name

WHERE condition;

Code Example 2

The following SQL creates a view that shows all customers from Brazil:

CREATE VIEW [Brazil Customers] AS
SELECT CustomerName, ContactName
FROM Customers
WHERE Country = 'Brazil';

Code Example 3

CREATE VIEW view_name AS SELECT id,category,MAX(created_at),content,title FROM table WHERE condition GROUP BY category

Learn ReactJs, React Native from akashmittal.com