Topics: Database, Microsoft SQL Server, Relational model Pages: 4 (435 words) Published: May 8, 2014
SQL Server Exercises on Aggregate Functions

Installing AdventureWorks2012 Database
This is a relational database that runs on a Database Engine instance.

To install this database, do the following:

Download the AdventureWork2012 database from The database file name is AdvntureWorks2012_Data.mdf. The file should be in the Downloads folder on your computer.

Copy the AdventureWorks2012_Data.mdf file to the data directory of the local SQL Server Database Engine instance. By default, it is located at C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Data.

Start SQL Server Management Studio and connect to the Database Engine instance. Right-click Databases, click Attach.
Click Add.

Select the AdventureWorks2012_Data.mdf database file and click OK. If the file is not listed, check the C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Data folder to be sure the file is there. In database details, remove the Log file entry. The sample download does not include a log file. A new log file will be created automatically when you attach the database. Select the log file and click Remove, and then click OK to attach just the primary database file.

By Venkat Devarapalli


select e.BusinessEntityID,
from AdventureWorks2012.HumanResources.Employee as e

By Venkat Devarapalli


By Venkat Devarapalli


1. WAQ to Display total no of Males and Female employees in the Organizations. 2. WAQ to Display total no of Married Males and Un Married Females in the Organizations. 3. WAQ to Display total no of Employee in designation wise.

4. WAQ to Display Senior most Employees in...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Essay about Managing Business Document Design and Development
  • Essay on Bap23 Principles of Managing Information and Producing Documents
  • Principles of Managing Information and Producing Documents Essay
  • Essay about A Guide on Writing Quality Management System Documents
  • Unit 312 Design and produce documents in a business environment Essay
  • BSBADM506B
  • BSBADM506 Essay
  • Togaf Architecture Definition Document Essay

Become a StudyMode Member

Sign Up - It's Free