Tuesday, January 28, 2014

Chapter 5 Lesson 2 Homework - Pivot, Unpivot

It's been about 4 days since I posted anything, busy with stuff, but ready to keep my head down and continue to grind.  Now that the syntax is becoming a bit more complicated I feel like I need to put more practice into what I'm doing, before absorbing more syntax and more info.

I've read through chapter 5, lesson 3 is especially heavy on syntax so I've been trying to do the homework that I assigned myself for chapter four and chapter five on a daily basis.  It usually takes me a half hour to forty minutes to get through.  I really have to pay attention to detail when doing it because one miss step and I will get it wrong… it's important to take your time when working through these.  They are an excellent for practice at lunch time or casual times of the day like that.

On a separate note, I should be receiving SQL Server Developer today in the mail, excited to put it to use with virtual box, and play around with it… more on that in future posts!

Here is are a few questions for pivoting that I've drawn up, again simple to write out AS LONG AS YOU KNOW THE SYNTAX!

1) USE TSQL2012 and create a table called 'freightavg' that uses selects custid, shipperid, and freight from sales.orders.  Pivot data in freightavg to find the the average freight totals for customers with custid's between 5 and 10….. with shipperid of 1, 2, 3.  Label this table as Fa

2) Homework exercises on pages 168 and 169 are especially good

No comments:

Post a Comment