Connecting Excel to SQL Statements

Just as there are tables in SQL Server within our AdventureWorks2014 database for us to query on, there are also predefined views that are available for us to use; for all practical purposes, these views behave exactly the same as tables. The views are available at the following location within SQL Server:

Connecting Excel to SQL Statements

The following script can be used to pull store information such as postal codes and the number of employees:

 SELECT StoreAddress.City as 'City' ,StoreAddress.Name as 'Store Name' ,StoreAddress.PostalCode as 'Postal Code' ,sum(StoreDemo.NumberEmployees) as 'Number of Employees' FROM [AdventureWorks2014].[Sales].[vStoreWithAddresses] ...

Get Practical Business Intelligence now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.