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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.