Joe Celko's SQL Puzzles and Answers, Second Edition, challenges you with his trickiest puzzles and then helps solve them with a variety of solutions and explanations.
Author Joe Celko demonstrates the thought processes that are involved in attacking a problem from an SQL perspective to help advanced database programmers solve the puzzles you frequently face. These techniques not only help with the puzzle at hand, but also help develop the mindset needed to solve the many difficult SQL puzzles you face every day. This updated edition features many new puzzles; dozens of new solutions to puzzles; and new chapters on temporal query puzzles and common misconceptions about SQL and RDBMS that leads to problems.
This book is recommended for database programmers with a good knowledge of SQL.
- A great collection of tricky SQL puzzles with a variety of solutions and explanations
- Uses the proven format of puzzles and solutions to provide a user-friendly, practical look into SQL programming problems - many of which will help users solve their own problems
- New edition features: Many new puzzles added! , Dozens of new solutions to puzzles, and using features in SQL-99, Code is edited to conform to SQL STYLE rules, New chapter on temporal query puzzles, New chapter on common misconceptions about SQL and RDBMS that leads to problems
Inhaltsverzeichnis
1;Front Cover;1 2;Joe Celko's Sql Puzzles & Answers ;2 3;Copyright Page;9 4;CONTENTS;12 5;Introduction;16 5.1;Acknowledgments, Corrections, and Future Editions;17 6;Part: Puzzle;20 6.1;Chapter 1. Fiscal Year Tables;20 6.2;Chapter 2. Absentees;23 6.3;Chapter 3. The Anesthesia Puzzle;28 6.4;Chapter 4. Security Badges;35 6.5;Chapter 5. Alpha Data;38 6.6;Chapter 6. Hotel Reservations;40 6.7;Chapter 7. Keeping A Portfolio;43 6.8;Chapter 8. Scheduling Printers;48 6.9;Chapter 9. Available Seats;53 6.10;Chapter 10. Wages of Sin;56 6.11;Chapter 11. Work Orders;64 6.12;Chapter 12. Claims Status;67 6.13;Chapter 13. Teachers;72 6.14;Chapter 14. Telephone;75 6.15;Chapter 15. Find The Last Two Salaries;79 6.16;Chapter 16. Mechanics;88 6.17;Chapter 17. Employment Agency;94 6.18;Chapter 18. Junk Mail;99 6.19;Chapter 19. Top Salespeople;101 6.20;Chapter 20. Test Results;105 6.21;Chapter 21. Airplanes And Pilots;107 6.22;Chapter 22. Landlord;111 6.23;Chapter 23. Magazine;113 6.24;Chapter 24. One In Ten;122 6.25;Chapter 25. Milestone;126 6.26;Chapter 26. Dataflow Diagrams;131 6.27;Chapter 27. Finding Equal Sets;134 6.28;Chapter 28. Calculate The Sine Function;140 6.29;Chapter 29. Find The Mode Computation;142 6.30;Chapter 30. Average Sales Wait;145 6.31;Chapter 31. Buying All The Products;148 6.32;Chapter 32. Computing Taxes;151 6.33;Chapter 33. Computing Depreciation;156 6.34;Chapter 34. Consultant Billing;160 6.35;Chapter 35. Inventory Adjustments;164 6.36;Chapter 36. Double Duty;167 6.37;Chapter 37. A Moving Average;171 6.38;Chapter 38. Journal Updating;174 6.39;Chapter 39. Insurance Losses;177 6.40;Chapter 40. Permutations;182 6.41;Chapter 41. Budgeting;188 6.42;Chapter 42. Counting Fish;191 6.43;Chapter 43. Graduation;195 6.44;Chapter 44. Pairs Of Styles;198 6.45;Chapter 45. Pepperoni Pizza;202 6.46;Chapter 46. Sales Promotions;205 6.47;Chapter 47. Blocks Of Seats;209 6.48;Chapter 48. Ungrouping;211 6.49;Chapter 49. Widget Count;219 6.50;Chapter 50. Two Of Three;222 6.51;Chapter
51. Budget Versus Actual;227 6.52;Chapter 52. Personnel Problem;231 6.53;Chapter 53. Collapsing A Table By Columns;234 6.54;Chapter 54. Potential Duplicates;237 6.55;Chapter 55. Playing The Ponies;240 6.56;Chapter 56. Hotel Room Numbers;243 6.57;Chapter 57. Gapsversion One;246 6.58;Chapter 58. Gapsversion Two;249 6.59;Chapter 59. Merging Time Periods;253 6.60;Chapter 60. Barcodes;256 6.61;Chapter 61. Sort A String;261 6.62;Chapter 62. Report Formatting;263 6.63;Chapter 63. Contiguous Groupings;273 6.64;Chapter 64. Boxes;276 6.65;Chapter 65. Age Ranges For Products;280 6.66;Chapter 66. Sudoku;282 6.67;Chapter 67. Stable Marriages Problem;286 6.68;Chapter 68. Catching The Next Bus;299 6.69;Chapter 69. Lifo-fifo Inventory;302 6.70;Chapter 70. Stock Trends;311 6.71;Chapter 71. Calculations;316 6.72;Chapter 72. Scheduling Service Calls;319 6.73;Chapter 73. A Little Data Scrubbing;323 6.74;Chapter 74. Derived Tables Or Not?;325 6.75;Chapter 75. Finding A Pub;328 7;Index;332 8;About the Author;346