Books & Videos

Table of Contents

  1. Chapter 1 SQL Fundamentals

    1. Run SQL from the Command Line

    2. Connect to SQL from a Program

    3. Perform Conditional INSERTs

    4. UPDATE the Database

    5. Solve a Crossword Puzzle Using SQL

    6. Don’t Perform the Same Calculation Over and Over

  2. Chapter 2 Joins, Unions, and Views

    1. Modify a Schema Without Breaking Existing Queries

    2. Filter Rows and Columns

    3. Filter on Indexed Columns

    4. Convert Subqueries to JOINs

    5. Convert Aggregate Subqueries to JOINs

    6. Simplify Complicated Updates

    7. Choose the Right Join Style for Your Relationships

    8. Generate Combinations

  3. Chapter 3 Text Handling

    1. Search for Keywords Without LIKE

    2. Search for a String Across Columns

    3. Solve Anagrams

    4. Sort Your Email

  4. Chapter 4 Date Handling

    1. Convert Strings to Dates

    2. Uncover Trends in Your Data

    3. Report on Any Date Criteria

    4. Generate Quarterly Reports

    5. Second Tuesday of the Month

  5. Chapter 5 Number Crunching

    1. Multiply Across a Result Set

    2. Keep a Running Total

    3. Include the Rows Your JOIN Forgot

    4. Identify Overlapping Ranges

    5. Avoid Dividing by Zero

    6. Other Ways to COUNT

    7. Calculate the Maximum of Two Fields

    8. Disaggregate a COUNT

    9. Cope with Rounding Errors

    10. Get Values and Subtotals in One Shot

    11. Calculate the Median

    12. Tally Results into a Chart

    13. Calculate the Distance Between GPS Locations

    14. Reconcile Invoices and Remittances

    15. Find Transposition Errors

    16. Apply a Progressive Tax

    17. Calculate Rank

  6. Chapter 6 Online Applications

    1. Copy Web Pages into a Table

    2. Present Data Graphically Using SVG

    3. Add Navigation Features to Web Applications

    4. Tunnel into MySQL from Microsoft Access

    5. Process Web Server Logs

    6. Store Images in a Database

    7. Exploit an SQL Injection Vulnerability

    8. Prevent an SQL Injection Attack

  7. Chapter 7 Organizing Data

    1. Keep Track of Infrequently Changing Values

    2. Combine Tables Containing Different Data

    3. Display Rows As Columns

    4. Display Columns As Rows

    5. Clean Inconsistent Records

    6. Denormalize Your Tables

    7. Import Someone Else’s Data

    8. Play Matchmaker

    9. Generate Unique Sequential Numbers

  8. Chapter 8 Storing Small Amounts of Data

    1. Store Parameters in the Database

    2. Define Personalized Parameters

    3. Create a List of Personalized Parameters

    4. Set Security Based on Rows

    5. Issue Queries Without Using a Table

    6. Generate Rows Without Tables

  9. Chapter 9 Locking and Performance

    1. Determine Your Isolation Level

    2. Use Pessimistic Locking

    3. Use Optimistic Locking

    4. Lock Implicitly Within Transactions

    5. Cope with Unexpected Redo

    6. Execute Functions in the Database

    7. Combine Your Queries

    8. Extract Lots of Rows

    9. Extract a Subset of the Results

    10. Mix File and Database Storage

    11. Compare and Synchronize Tables

    12. Minimize Bandwidth in One-to-Many Joins

    13. Compress to Avoid LOBs

  10. Chapter 10 Reporting

    1. Fill in Missing Values in a Pivot Table

    2. Break It Down by Range

    3. Identify Updates Uniquely

    4. Play Six Degrees of Kevin Bacon

    5. Build Decision Tables

    6. Generate Sequential or Missing Data

    7. Find the Top n in Each Group

    8. Store Comma-Delimited Lists in a Column

    9. Traverse a Simple Tree

    10. Set Up Queuing in the Database

    11. Generate a Calendar

    12. Test Two Values from a Subquery

    13. Choose Any Three of Five

  11. Chapter 11 Users and Administration

    1. Implement Application-Level Accounts

    2. Export and Import Table Definitions

    3. Deploy Applications

    4. Auto-Create Database Users

    5. Create Users and Administrators

    6. Issue Automatic Updates

    7. Create an Audit Trail

  12. Chapter 12 Wider Access

    1. Sharing Data Across the Internet

    2. Allow an Anonymous Account

    3. Find and Stop Long-Running Queries

    4. Don’t Run Out of Disk Space

    5. Run SQL from a Web Page

  1. Colophon