T-SQL: Using Subqueries, APPLY, and Table Expressions

Notes on Using Table Expressions Querying Views: A presentation of the data which provides abstraction and acts as a layer of security over the database. Named queries with definitions stored in a database. Creating a View: CREATE VIEW SalesLT.vCustomerAddress AS SELECT c.CustomerID, FirstName, LastName, AddressLine1, City, StateProvince FROM SalesLT.Customer AS c JOIN SalesLT.CustomerAddress AS ca … Continue reading T-SQL: Using Subqueries, APPLY, and Table Expressions

T-SQL: Using Set Operators and using Functions to Aggregate Data

Furthermore, here is how I completed labs four and five using Set Operators and Functions to Aggregate Data: Lab 4 1. Write a query that retrieves the company name, first line of the street address, city, and a column named AddressType with the value ‘Billing’ for customers where the address type in the SalesLT.CustomerAddress table … Continue reading T-SQL: Using Set Operators and using Functions to Aggregate Data