Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

To sharpen the Query Logic Expand / Collapse
Author
Message
Posted Friday, October 19, 2012 7:04 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 5:20 AM
Points: 3,546, Visits: 2,651
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 ?
Post #1374801
Posted Friday, October 19, 2012 10:53 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 8:35 AM
Points: 7,197, Visits: 6,342
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 Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1374933
Posted Friday, October 19, 2012 11:04 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 3:41 PM
Points: 13,315, Visits: 12,182
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 Moden's 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)
Post #1374938
Posted Friday, October 19, 2012 5:19 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 1:49 PM
Points: 2,044, Visits: 3,062
Look for books and articles by Itzik Ben-Gan; his stuff on T-SQL is superb.

SQL DBA,SQL Server MVP('07, '08, '09)
"In America, every man is innocent until proven broke!" Brant Parker
Post #1375062
Posted Monday, October 22, 2012 1:08 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 5:20 AM
Points: 3,546, Visits: 2,651
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.
Post #1375274
Posted Monday, October 22, 2012 4:04 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 8:35 AM
Points: 7,197, Visits: 6,342
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 Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1375320
Posted Monday, October 22, 2012 9:53 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 12:36 AM
Points: 36,995, Visits: 31,524
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."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1375556
Posted Tuesday, October 23, 2012 12:38 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 5:20 AM
Points: 3,546, Visits: 2,651
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.
Post #1375851
Posted Tuesday, October 23, 2012 4:30 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 8:35 AM
Points: 7,197, Visits: 6,342
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 Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #1375948
Posted Tuesday, October 23, 2012 7:45 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 5:20 AM
Points: 3,546, Visits: 2,651
Thanks Brandie, Jeff and All. Found few sites.
Post #1376049
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse