Preview

DOCUMENTS

Satisfactory Essays
Open Document
Open Document
435 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
DOCUMENTS
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 http://msftdbprodsamples.codeplex.com/releases/view/55330
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 venkateswarlu.devarapalli@ptgindia.com venkat.it.d@gmail.com

1

select e.BusinessEntityID,
e.JobTitle,
e.BirthDate,
e.MaritalStatus,
e.Gender,
e.HireDate,
e.VacationHours,
e.SickLeaveHours
from AdventureWorks2012.HumanResources.Employee as e

By Venkat Devarapalli venkateswarlu.devarapalli@ptgindia.com venkat.it.d@gmail.com

2

By Venkat Devarapalli venkateswarlu.devarapalli@ptgindia.com venkat.it.d@gmail.com

3

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

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Nt1330 Unit 9 Final Paper

    • 491 Words
    • 2 Pages

    In previous post I have shown how to add a data connection in server explorer for a SQLite database file, and along the way also showed the process to create a new SQLite database file using visual studio 2010. if you haven’t read it or wish to read it please visit http://munnaondotnet.blogspot.com/2012/06/using-sqlite-in-visual-studio-2010-with.html farther more you can visit http://munnaondotnet.blogspot.com/search/label/SQLite for other SQLite post.…

    • 491 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Begin to import the downloaded Exploring_a02_Birthdays.xlsx workbook as a new table in the current database. Click Next two times.…

    • 402 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    70-640 Lesson 11

    • 1132 Words
    • 5 Pages

    __b__ 8. This is used as a reference file in case the Active Directory database needs to be recovered from a system failure to ensure that no transactions are lost.…

    • 1132 Words
    • 5 Pages
    Powerful Essays
  • Powerful Essays

    ( NAME = N'Jeff Thompson Sr - POS 410 - IA - KVO', FILENAME = N'D:\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\Jeff Thompson Sr - POS 410 - IA - KVO.mdf' , SIZE = 2048KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )…

    • 1555 Words
    • 7 Pages
    Powerful Essays
  • Good Essays

    Week 1 Submission

    • 1120 Words
    • 5 Pages

    Copy the demo.sql file from the Doc Share to the C:\temp directory. At the sql prompt enter the command @V:\temp\demo.sql. This will create some tables and insert data into them. View the script in notepad to determine the table names that were created. Use the describe command to view the structure of the tables. Please use the template below to provide your solutions.…

    • 1120 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    download its to your computer which this file are safe and virus free. You can read this document…

    • 305 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Music

    • 1176 Words
    • 5 Pages

    DATABASE NAME – When you save your database, you must save it as Lastname-Hardware_Store, ex. KING_Hardware_Store…

    • 1176 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    You are employed as an accounts clerk in JA Muddlestone. The computer system has crashed and the back up will not load due to a technical problem.…

    • 1070 Words
    • 5 Pages
    Good Essays
  • Powerful Essays

    This is a solution to a previous year’s assignment submitted by a former KXO206 Student (used with permission) KXO206 Database Management Systems Assignment 3: Database Creation Report Michael Cantwell Skid Marx Motor Inn Executive Summary The Skid Marx Motor Inn has multiple requirements for its database management system (DBMS). These relate primarily to their user of the DBMS to support the operation of their Inn. As such this report provides scripts and example outputs of these scripts. Ten requirements were specified by Skid Marx Motor Inn and each has been addressed in the following manner:…

    • 7096 Words
    • 63 Pages
    Powerful Essays
  • Better Essays

    Sybase ASE Structure

    • 1884 Words
    • 8 Pages

    The master, model, and temporary databases reside on the device named during installation, which is known as the master device. The master database is contained entirely on the master device and cannot be expanded onto any other device. All other databases and user objects should be created on other devices.…

    • 1884 Words
    • 8 Pages
    Better Essays
  • Satisfactory Essays

    To Working with VB Forms and Connect the Oracle 10g to Visual Studio 6.0 for Database Connectivity…

    • 421 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Rtc Configuration

    • 462 Words
    • 2 Pages

    * Copy xp_ndo.dll and xp_ndo_x64.dll extension files from the Microsoft Dynamics NAV 6.02 setup cd [SQLDatabase\PFiles\Microsoft Dynamics NAV\60\Database] in C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQKSERVER\MSSQL\Binn folder.…

    • 462 Words
    • 2 Pages
    Good Essays
  • Good Essays

    11. click on manage database and there will be 3 databases you can use in free account. You can import you database through page shown or phpmyadmin. Export the database from local PC and import in here. Now change your database name, and username, password in php files to connect to database.…

    • 372 Words
    • 2 Pages
    Good Essays
  • Powerful Essays

    Wordpress-Setup

    • 582 Words
    • 3 Pages

    - To create a new database, click “Databases” in the tab pane (first tab), and then enter a…

    • 582 Words
    • 3 Pages
    Powerful Essays
  • Satisfactory Essays

    Visa Processing System

    • 331 Words
    • 2 Pages

    The project “Visa Processing System” is an automated system. It describes the process of applying for visa. There are so many visa types provided by the government like H1-visa, Dependent visa. Getting a Visa, Visa issuance is a very objective decision, and is not subjective. Every visa official has a list of requirements applicant looks for in a visa application. If they are met, then applicant issues the visa. If not, applicant doesn't. It is how these requirements are met that makes a visa decision seem subjective.…

    • 331 Words
    • 2 Pages
    Satisfactory Essays