Jump to ratings and reviews
Rate this book

SQL Tricks

Rate this book
This cookbook of advanced techniques is for anyone who knows the basics of SQL and wants to move beyond simple SELECT-FROM-WHERE queries. You'll find solutions to problems that analysts, app developers, and database programmers often face, from simple tasks, like picking random rows, to complex operations, like traversing hierarchies. Each recipe includes a discussion of the underlying logic, important concepts, and best practices. Take full advantage of standard (ANSI/ISO) SQL, or use DBMS-specific features that dramatically extend the power of standard SQL. Use the scores of code examples directly in real-world DBMS applications, or as a source of insight for related problems. Contents
Introduction
1. Running SQL Programs
2. Calculating Running Statistics
3. Generating Sequences
4. Finding Sequences, Runs, and Regions
5. Limiting the Number of Rows Returned
6. Assigning Ranks
7. Calculating a Trimmed Mean
8. Picking Random Rows
9. Handling Duplicates
10. Creating a Telephone List
11. Retrieving Metadata
12. Working with Dates
13. Calculating a Median
14. Finding Extreme Values
15. Changing Running Statistics Midstream
16. Pivoting Results
17. Working with Hierarchies About the Author
Chris Fehily is a statistician and author based in San Francisco.

118 pages, Paperback

First published December 16, 2013

1 person is currently reading
2 people want to read

About the author

Chris Fehily

33 books11 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
0 (0%)
4 stars
2 (66%)
3 stars
0 (0%)
2 stars
1 (33%)
1 star
0 (0%)
Displaying 1 of 1 review
4 reviews1 follower
September 2, 2018
Nice compendium of SAL examples

If you are looking for example SAL for just about any DBMS this book offers what you are looking for, useful, practical SAL for Oracle, Db2, SAL Server, MySQL, Access, Postgres... Good book
Displaying 1 of 1 review

Can't find what you're looking for?

Get help and learn more about the design.