SQL Cookbook [NOOK Book]

Overview

You know the rudiments of the SQL query language, yet you feel you aren't taking full advantage of SQL's expressive power. You'd like to learn how to do more work with SQL inside the database before pushing data across the network to your applications. You'd like to take your SQL skills to the next level.


Let's face it, SQL is a deceptively simple language to learn, and many database developers never go far beyond the simple statement: SELECT...

See more details below
SQL Cookbook

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$17.99
BN.com price
(Save 43%)$31.99 List Price

Overview

You know the rudiments of the SQL query language, yet you feel you aren't taking full advantage of SQL's expressive power. You'd like to learn how to do more work with SQL inside the database before pushing data across the network to your applications. You'd like to take your SQL skills to the next level.


Let's face it, SQL is a deceptively simple language to learn, and many database developers never go far beyond the simple statement: SELECT columns FROM table WHERE conditions. But there is so much more you can do with the language. In the SQL Cookbook, experienced SQL developer Anthony Molinaro shares his favorite SQL techniques and features. You'll learn about:



  • Window functions, arguably the most significant enhancement to SQL in the past decade. If you're not using these, you're missing out


  • Powerful, database-specific features such as SQL Server's PIVOT and UNPIVOT operators, Oracle's MODEL clause, and PostgreSQL's very useful GENERATE_SERIES function


  • Pivoting rows into columns, reverse-pivoting columns into rows, using pivoting to facilitate inter-row calculations, and double-pivoting a result set


  • Bucketization, and why you should never use that term in Brooklyn.


  • How to create histograms, summarize data into buckets, perform aggregations over a moving range of values, generate running-totals and subtotals, and other advanced, data warehousing techniques


  • The technique of walking a string, which allows you to use SQL to parse through the characters, words, or delimited elements of a string


Written in O'Reilly's popular Problem/Solution/Discussion style, the SQL Cookbook is sure to please. Anthony's credo is: "When it comes down to it, we all go to work, we all have bills to pay, and we all want to go home at a reasonable time and enjoy what's still available of our days." The SQL Cookbook moves quickly from problem to solution, saving you time each step of the way.

For anyone writing SQL in a professional environment, this book presents a compendium of solutions that readers can immediately apply to commonly-faced, real-world data query and manipulation problems.

Read More Show Less

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
You need a quick SQL query. Not a lecture. You need SQL Cookbook. There are 160-plus reliable, easy-to-adapt recipes here, for everything from simple record retrieval to data warehousing. Each one’s presented and explained as simply and concisely as humanly possible. And (except for one “bonus” chapter) everything’s cross-platform: tested for DB2 v. 8, Oracle 10g, PostgreSQL 8, SQL Server 2005, and MySQL 5.

Want to sort results by substrings? Combine related rows from multiple tables? Insert a new record? Copy a table definition? List tables in a schema? Extract initials from a name? Parse an IP address? Compute a running total? Determine next year’s quarter start/end dates? Fill in missing values in a range? Rank your results? Pivot result sets into a single row? Build hierarchical queries? Don’t waste time figuring it out from scratch: It’s all right here. Bill Camarda, from the February 2006 Read Only

Read More Show Less

Product Details

  • ISBN-13: 9780596555016
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 12/16/2005
  • Series: Cookbooks (O'Reilly)
  • Sold by: Barnes & Noble
  • Format: eBook
  • Edition number: 1
  • Pages: 636
  • Sales rank: 576933
  • File size: 3 MB

Meet the Author

Anthony Molinaro is a SQL developer and database administrator with many years experience in helping developers improve their SQL queries. SQL is particular passion of Anthony's, and he's become known as the go-to guy among his clients when it comes to solving difficult SQL query problems. He's well-read, understands relational theory well, and has nine years of hands-on experience solving tough, SQL problems. Anthony is particularly well-acquainted with new and powerful SQL features such as the windowing function syntax that was added to the most recent SQL standard.

Read More Show Less

Table of Contents

1 Retrieving records 1
2 Sorting query results 14
3 Working with multiple tables 28
4 Inserting, updating, deleting 62
5 Metadata queries 83
6 Working with strings 95
7 Working with numbers 155
8 Date arithmetic 188
9 Date manipulation 219
10 Working with ranges 298
11 Advanced searching 325
12 Reporting and warehousing 365
13 Hierarchical queries 441
14 Odds 'n' ends 471
A Window function refresher 525
B Rozenshtein revisited 551
Read More Show Less

Customer Reviews

Average Rating 4
( 7 )
Rating Distribution

5 Star

(1)

4 Star

(4)

3 Star

(2)

2 Star

(0)

1 Star

(0)
Sort by: Showing all of 7 Customer Reviews
  • Anonymous

    Posted Sun Jul 16 00:00:00 EDT 2006

    'COOKING WITH SQL'

    Are you an SQL novice, journeyman, expert or a non-SQL programmer? If you are, then this book is for you! Author Anthony Molinaro, has done an outstanding job of writing a practical book that gives you the reader, a glimpse of what can be done using SQL outside of what is considered the typical SQL problem domain.. Molinaro, begins by introducing very simple queries. Then, the author introduces recipes for sorting query results. Next, he introduces recipes for combining data from multiple tables. The author then introduces recipes for inserting, updating, and deleting data, respectively. He continues by introducing recipes for getting at your database metadata. Then, the author introduces recipes for manipulating strings. Next, he introduces recipes for common number crunching. He also deals with data arithmetic. The author continues by showing you recipes for some of the most common date operations you will encounter in a typical work day. Then, he introduces recipes for identifying values in ranges, and for creating ranges of values. Next, the author introduces recipes that are crucial for everyday development and yet sometimes slip through the cracks. He also introduces queries typically used in warehousing or generating complex reports. The author continues by introducing you to hierarchical recipes. Finally, the author focuses on vendor-specific solutions. In this most excellent cookbook, you will find a collection of common SQL problems and their solutions that you'll find helpful in your day-to-day work. More importantly, this cookbook will help you take your SQL skills to the next level.

    3 out of 3 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted Sun Oct 31 00:00:00 EDT 2010

    No text was provided for this review.

  • Anonymous

    Posted Fri May 20 00:00:00 EDT 2011

    No text was provided for this review.

  • Anonymous

    Posted Sun Jan 30 00:00:00 EST 2011

    No text was provided for this review.

  • Anonymous

    Posted Fri Jul 01 00:00:00 EDT 2011

    No text was provided for this review.

  • Anonymous

    Posted Mon Apr 25 00:00:00 EDT 2011

    No text was provided for this review.

  • Anonymous

    Posted Sat Jul 31 00:00:00 EDT 2010

    No text was provided for this review.

Sort by: Showing all of 7 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)