SQL Exercises, Practice, Solution - exercises on AdventureWorks Database
SQL Queries of AdventureWorks Database:
The AdventureWorks Database is a Microsoft product sample that provides an example of an online transaction processing (OLTP) database. Adventure Works Cycles is a fictitious multinational manufacturing company that is supported by the AdventureWorks Database.
Exercises:
List of Schemas and Tables and ER Diagram in the AdventureWorks database:
Schema: humanresources
E R Diagram of humanresources Schema:

Schema: person
- address
- addresstype
- businessentity
- businessentityaddress
- businessentitycontact
- contacttype
- countryregion
- emailaddress
- person
- personphone
- phonenumbertype
- stateprovince
E R Diagram of person Schema:

Schema: production
- location
- illustration
- productcategory
- productcosthistory
- productlistpricehistory
- productmodelproductdescriptionculture
- productreview
- scrapreason
- productsubcategory
- transactionhistory
- transactionhistoryarchive
- productmodelillustration
- unitmeasure
- productmodel
- workorderrouting
- billofmaterials
- productdescription
- productdocument
- culture
- product
- productphoto
- productinventory
- productproductphoto
- workorder
E R Diagram of production Schema:

Schema: purchasing
E R Diagram of purchasing Schema:

Schema: sales
- salesorderheadersalesreason
- customer
- countryregioncurrency
- currencyrate
- creditcard
- specialoffer
- specialofferproduct
- currency
- store
- personcreditcard
- salestaxrate
- salespersonquotahistory
- salesreason
- salesterritoryhistory
- salesterritory
- salesperson
- salesorderheader
- salesorderdetail
- shoppingcartitem
E R Diagram of sales Schema:

Download Postgre verseion of AdventureWorks Database. Clickhere.
SQL: Tips of the Day
What is the best way to paginate results in SQL Server?
SELECT * FROM ( SELECT ROW_NUMBER() OVER ( ORDER BY OrderDate ) AS RowNum, * FROM Orders WHERE OrderDate >= '1980-01-01' ) AS RowConstrainedResult WHERE RowNum >= 1 AND RowNum < 20 ORDER BY RowNum
Database: SQL Server
Ref: https://bit.ly/3MGrNlk
- Weekly Trends
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join
- JavaScript functions Exercises
- Python Tutorial
- Python Array Exercises
- SQL Cross Join
- C# Sharp Array Exercises
We are closing our Disqus commenting system for some maintenanace issues. You may write to us at reach[at]yahoo[dot]com or visit us at Facebook