Count Pivot and Rank Example

  • The Grid displays data from the query in the textbox at the bottom.
  • The data is sortable by clicking on the column headers.
  • The query rolls up the sales numbers by quarter and counts the number of orders and customers.
  • The query also returns the number of customers by product category.
  • Finally, the query ranks the sales by quarter.
qtrorderQtrcustomerQtrBikesComponentsAccessoriesClothingOrderRank
2001-32178884616881136713
2001-4297310567421171296810
2002-1245494073565954511
2002-230601125810122128659
2002-3760416209792912081425
2002-46235154410032242131047
2003-1465014751039172184808
2003-26403173711942162191086
2003-31883868461935399146230504
2003-42134694222684345201643772
2004-11956396372798249215144393
2004-223804113953596351239750511
2004-322091172  34682612

Michael W Stark

Software Developer

.Net 3.5
SQLServer 2005 2008

Rich Interface Design

Rapid Development

Flash


My Work


SQL Samples