Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
T-SQL (SS2K8)
»
Exercises in t-SQL
79 posts, Page 1 of 8
1
2
3
4
5
»
»»
Exercises in t-SQL
Rate Topic
Display Mode
Topic Options
Author
Message
T4FF
T4FF
Posted Tuesday, November 13, 2012 7:06 AM
Grasshopper
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 3:28 PM
Points: 11,
Visits: 124
I'm in the process of setting up a training environment here, it's a mechanism for me to bring high flyers in from the business and give them somewhere to learn SQL.
I've got training content and t-SQL CBTs etc, but I was wondering whether there were any standard t-SQL exercises that I can make use of that are based on Adventureworks? Or if not, something that I could tailor for my environment?
Anyone know of any decent content? This would be from complete beginner up...
Post #1384074
bitbucket-25253
bitbucket-25253
Posted Tuesday, November 13, 2012 7:28 AM
SSCertifiable
Group: General Forum Members
Last Login: Yesterday @ 1:49 PM
Points: 5,122,
Visits: 20,362
Not truly knowing your groups background and how deep in depth you wish to go with your training, may I suggest reviewing the "SPACKLE" articles here on SSC.
Just enter the term "SPACKLE" in the search window in the upper right hand corner of this page and give it a quick look over.
If everything seems to be going well, you have obviously overlooked something.
Ron
Please help us, help you -before posting a question please
read
Before posting a performance problem please
read
Post #1384090
T4FF
T4FF
Posted Wednesday, November 14, 2012 7:44 AM
Grasshopper
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 3:28 PM
Points: 11,
Visits: 124
bitbucket-25253 (11/13/2012)
Just enter the term "SPACKLE" in the search window in the upper right hand corner of this page and give it a quick look over.
That is actually quite useful, but not what I'm looking for (this will be of value though!). What I'm looking for is exercises for the guys to do (who could be literally learning how to write a SELECT statement for the first time). I.e. can you pick out all the staff called bob from adventureworks who are right handed (random!). That kind of thing. I can write a load up myself, but I'm hoping someone else has done it for me
Post #1384635
CapnHector
CapnHector
Posted Wednesday, November 14, 2012 11:57 AM
SSC Eights!
Group: General Forum Members
Last Login: Thursday, June 06, 2013 3:00 PM
Points: 939,
Visits: 1,713
I just wrote up a similar course and could not find any sample data to my liking. I started with Adventureworks but due to the multiple schema's decided against it for my class. went with a much simpler setup using only the default schema. i also looked at it as a good exercise for generating random test data. Really helped me in that area and i now am much more confident at creating the random data for testing queries if i dont have nice production data.
EDIT: I was able to find the CREATE TABLE and data inserts for the DB i used. It is based off of the script from Essential SQL on SQL Server 2008 by Sikha Bagui with some rather heavy modifications by me to better suit the 5 day course i wrote.
For faster help in answering any problems Please read
How to post data/code on a forum to get the best help - Jeff Moden
for the best way to ask your question.
For performance Issues see how we like them posted here:
How to Post Performance Problems - Gail Shaw
Need to Split some strings?
Jeff Moden's DelimitedSplit8K
Jeff Moden's
Cross tab and Pivots Part 1
Jeff Moden's
Cross tab and Pivots Part 2
Jeremy Oursler
Post Attachments
CourseScript.txt
(
13 views,
136.49 KB
)
Post #1384795
Jeff Moden
Jeff Moden
Posted Wednesday, November 14, 2012 5:12 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Yesterday @ 9:01 PM
Points: 33,111,
Visits: 27,037
T4FF (11/14/2012)
bitbucket-25253 (11/13/2012)
Just enter the term "SPACKLE" in the search window in the upper right hand corner of this page and give it a quick look over.
That is actually quite useful, but not what I'm looking for (this will be of value though!). What I'm looking for is exercises for the guys to do (who could be literally learning how to write a SELECT statement for the first time). I.e. can you pick out all the staff called bob from adventureworks who are right handed (random!). That kind of thing. I can write a load up myself, but I'm hoping someone else has done it for me
Create a million row FizzBuzz table. FizzBuzz isn't a comment. It's the name of a very common problem based on a child's game, is frequently given on interviews, and is actually a wonderful teaching tool to show people the difference between RBAR, Hidden RBAR, and Set Based methods that use "Pseudo Cursors". Have them do it with explicit loops, with a recursive CTE, without either of those at least 3 different ways, and then measure and discuss the resource usage and performance differences. So far as I'm concerned, it's one of the more important concepts in SQL Server.
The other exercise would be to teach people how to use Books Online and Google.
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1384936
vikingDBA
vikingDBA
Posted Thursday, November 15, 2012 7:28 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, May 23, 2013 7:34 AM
Points: 189,
Visits: 864
Try this:
[url=http://www.sqlcourse.com/index.html][/url]
Post #1385152
vikingDBA
vikingDBA
Posted Thursday, November 15, 2012 7:29 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, May 23, 2013 7:34 AM
Points: 189,
Visits: 864
Well, that didn't work very well, did it. You get the picture.
http://www.sqlcourse.com/index.html
Post #1385154
T4FF
T4FF
Posted Thursday, November 15, 2012 6:54 PM
Grasshopper
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 3:28 PM
Points: 11,
Visits: 124
Jeff Moden (11/14/2012)
Create a million row FizzBuzz table.
You saw this right??
T4FF (11/14/2012)
who could be literally learning how to write a SELECT statement for the first time
I'd scare them back to their departments with that
Jeff Moden (11/14/2012)
The other exercise would be to teach people how to use Books Online and Google.
True!
Post #1385412
T4FF
T4FF
Posted Thursday, November 15, 2012 7:08 PM
Grasshopper
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 3:28 PM
Points: 11,
Visits: 124
I'm not sure if I've explained myself very well, as none of the suggestions are quite what I'm after. We've got training material, books, CBTs and coaching. What I'm after is exercises to give them to go away and figure out, scenarios....like can you tell me how many employees are over 50, can you tell me how many employees have red cars, can you tell me how many employees surnames begin with a etc etc
Post #1385415
starshayiz
starshayiz
Posted Thursday, November 15, 2012 7:44 PM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, November 15, 2012 7:33 PM
Points: 9,
Visits: 0
Post #1385425
« Prev Topic
|
Next Topic »
79 posts, Page 1 of 8
1
2
3
4
5
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.