Difference between revisions of "AdventureWorks hard questions"

From SQLZOO
Jump to: navigation, search
Line 1: Line 1:
 +
{{AdventureWorks Assessment}}
 
<span id=startAt class=params>11</span>
 
<span id=startAt class=params>11</span>
 
<div class='qu'>
 
<div class='qu'>
{{AdventureWorks Assessment}}
 
 
<p class='imper'>For every customer with a 'Main Office' in Dallas show AddressLine1 of the 'Main Office' and AddressLine1 of the 'Shipping' address - if there is no shipping address leave it blank. Use one row per customer.</p>
 
<p class='imper'>For every customer with a 'Main Office' in Dallas show AddressLine1 of the 'Main Office' and AddressLine1 of the 'Shipping' address - if there is no shipping address leave it blank. Use one row per customer.</p>
 
<source lang='sql' class='def'>
 
<source lang='sql' class='def'>

Revision as of 20:36, 9 August 2012

11

For every customer with a 'Main Office' in Dallas show AddressLine1 of the 'Main Office' and AddressLine1 of the 'Shipping' address - if there is no shipping address leave it blank. Use one row per customer.

 

For each order show the SalesOrderID and SubTotal calculated three ways:
A) From the SalesOrderHeader
B) Sum of OrderQty*UnitPrice
C) Sum of OrderQty*ListPrice

 

Show the best selling item by value.

 

Show how many orders are in the following ranges (in $):

    RANGE      Num Orders      Total Value
    0-  99
  100- 999
 1000-9999
10000-

 

Identify the three most important cities. Show the break down of top level product category against city.

 
Personal tools
Namespaces

Variants
Actions
Reference
Toolbox
Google AdSense