SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


To sharpen the Query Logic


To sharpen the Query Logic

Author
Message
sqlnaive
sqlnaive
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6439 Visits: 2774
Hello SQL Gurus,
I want to sharpen by logics in making efficient SQL queries. Is there any book or any website which provides questions on SQL queries ?
Brandie Tarvin
Brandie Tarvin
SSC-Dedicated
SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)

Group: General Forum Members
Points: 38513 Visits: 9279
SQL Server Books Online should be your first resource in understanding how queries work.

SQL Queries for Mere Mortals can give you the basics in writing the SELECT statement (the heart of all SQL queries).

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Sean Lange
Sean Lange
SSC Guru
SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)SSC Guru (63K reputation)

Group: General Forum Members
Points: 63544 Visits: 17966
What you are describing is a process not an event. There isn't a book you can read and when you finish you are now able to write efficient queries. One of the best ways to improve is to hang around there forums, try answering questions, read what others are doing, read lots of articles, try new stuff. Writing efficient queries is what is learned through experience.

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Modens splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
ScottPletcher
ScottPletcher
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19929 Visits: 7415
Look for books and articles by Itzik Ben-Gan; his stuff on T-SQL is superb.

SQL DBA,SQL Server MVP(07, 08, 09) Prosecutor James Blackburn, in closing argument in the Fatal Vision murders trial:
If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them.
sqlnaive
sqlnaive
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6439 Visits: 2774
Hi Brandie, Sean, ScottPletcher, I understand there can be no book on T-Sql which you can finish reading and say "Yeah, I'm the man now". It was just like, if there are any books on T-SQL puzzles for newbees, some SQL challenges which can enhance the SQl writing skills. There must be some authors for MS SQL Server who love to write SQL challenges for different scenarios.
Brandie Tarvin
Brandie Tarvin
SSC-Dedicated
SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)

Group: General Forum Members
Points: 38513 Visits: 9279
SQL challenges don't help you improve your query logic, they just encourage people to use what they know. If you're trying to sharpen your skills, read up on best practices and participate in the forums trying to help other people. And learn to use Profiler and execution plans so you can better understand the flaws in your code logic.

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)SSC Guru (218K reputation)

Group: General Forum Members
Points: 218091 Visits: 41995
sqlnaive (10/22/2012)
Hi Brandie, Sean, ScottPletcher, I understand there can be no book on T-Sql which you can finish reading and say "Yeah, I'm the man now". It was just like, if there are any books on T-SQL puzzles for newbees, some SQL challenges which can enhance the SQl writing skills. There must be some authors for MS SQL Server who love to write SQL challenges for different scenarios.


Gosh, if you want challenges, start answering questions on these forums.

If you want some base method that can be expanded to solve various challenges, here's a link to a list of articles that can really help. I know the guy personally! ;-)
http://www.sqlservercentral.com/Authors/Articles/Jeff_Moden/80567/

There are some great authors on the "Authors" link on the left side of the page. I'll also second Itzik Ben-Gan's books.

Don't expect to get "smart" about it all overnight, though.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
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.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
sqlnaive
sqlnaive
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6439 Visits: 2774
Hi Jeff, please don't take me wrong way. It's like there is so many material on mathematics, physcs, chemistry puzzles. As Microsoft SQL Server T-Sql is so much popular and there is lots of stuff, blogs out there in net and lots of information, there must be some sites, blogs or books totally and entirely focused on pure T-SQL stuff on scenarios based situation.

Definitely there are some good questions in SQLServerCentral Question of the day and in some other sites but then those are not totally dedicated to t-sql. These are mix-ups of all the components of MS SQL. I was wondering if someone is interested mainly in developing Query writing stuff based on certain conditions, then there must be something for him/her.
Brandie Tarvin
Brandie Tarvin
SSC-Dedicated
SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)SSC-Dedicated (38K reputation)

Group: General Forum Members
Points: 38513 Visits: 9279
sqlnaive, have you tried google yet? There are definitely challenges out there, if that's all you're interested in. And they should come up easily in a search engine.

The key phrase is "T-SQL Challenges".

Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
sqlnaive
sqlnaive
SSCertifiable
SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)SSCertifiable (6.4K reputation)

Group: General Forum Members
Points: 6439 Visits: 2774
Thanks Brandie, Jeff and All. Found few sites. :-):-):-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search