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
How to combine date from one field with time from another field - MS SQL Server
You can simply add the two.
- if the Time part of your Date column is always zero
- and the Date part of your Time column is also always zero (base date: January 1, 1900)
Adding them returns the correct result-
SELECT Combined = MyDate + MyTime FROM MyTable
Ref: https://bit.ly/3wldJYf
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- 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
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