You are on page 1of 4

Lab # 7: Views SWE-209

LAB # 7

VIEWS
OBJECTIVE

 The nature of views, and how they can be used


 How to create, alter, and drop views using T-SQL

LAB TASKS

1. From the following table, create a view for those salespersons belonging to the city
of your choice

OUTPUT:
Lab # 7: Views SWE-209

2. From the following table, create a view for all salespersons. Return salesperson
ID, name, and city.

OUTPUT:

3. From the following table, create a view to finding the salespersons of the city 'New
York'

OUTPUT:
Lab # 7: Views SWE-209

4. From the following table, create a view to count the number of customers in
each grade

OUTPUT:
Lab # 7: Views SWE-209

5. From the following table, create a view to count the number of unique
customer, compute average and total purchase amount of customer orders by
each date

OUTPUT:

You might also like