• What does your dataset look like? Could you post some dummy data? Hate to push you into the deep end in your first lesson, but here goes... This is a great place to start: http://www.sqlservercentral.com/articles/Best+Practices/61537/

    It's Jeff's explanation of how to get good help. If you follow his instructions, the likelihood that you'll get a tested solution that actually works increases dramatically.