Skip to main content

Joe Celko's SQL Puzzles and Answers

  • 1st Edition - March 1, 1997
  • Latest edition
  • Author: Joe Celko
  • Language: English

Joe Celko challenges you with his trickiest puzzles and then helps you conquer them with a variety of solutions and explanations. The puzzles are a compilation from Joe's co… Read more

Purchase options

Sorry, this title is not available for purchase in your country/region.

World Book Day celebration

Where learning shapes lives

Up to 25% off trusted resources that support research, study, and discovery.

Description

Joe Celko challenges you with his trickiest puzzles and then helps you conquer them with a variety of solutions and explanations. The puzzles are a compilation from Joe's columns in DBMS and Database Programming & Design magazines. They include new, never-before-published puzzles plus new solutions and extra background for previously published puzzles. In his usual entertaining and informative style, Joe demonstrates the thought processes that are involved in attacking a problem from an SQL perspective. Through the practical, enjoyable puzzles, he introduces immediately useful new techniques and applications for SQL programming, and shows the database programmer how to write and use non-procedural programs.

Table of contents

Joe Celko's SQL Puzzles and Answersby Joe Celko
    Preface Chapter 1: Defining Data
      Denormalized DatabasesBad Encoding SchemesPuzzle 1. Creating TablesPuzzle 2. AbsenteePuzzle 3. AnesthesiaPuzzle 4. Security BadgesPuzzle 5. Formatting Your DataPuzzle 6. Hotel ReservationsPuzzle 7. PortfolioPuzzle 8. Scheduling PrintersPuzzle 9. Available SeatsPuzzle 10. Wages of SinPuzzle 11. Work Order
    Chapter 2: Formatting Data
      Puzzle 12. Claims StatusPuzzle 13. TeacherPuzzle 14. TelephonePuzzle 15. Find the Last Two Salaries
    Chapter 3: Selecting Data
      Puzzle 16. MechanicsPuzzle 17. Employment AgencyPuzzle 18. Junk MailPuzzle 19. Top SalespersonsPuzzle 20. Test ResultsPuzzle 21. Airplanes and PilotsPuzzle 22. LandlordPuzzle 23. MagazinePuzzle 24. One in TenPuzzle 25. MilestonePuzzle 26. Dataflow DiagramsPuzzle 27. Finding Equal Sets
    Chapter 4: Computing Things
      Puzzle 28. Calculate the Sine FunctionPuzzle 29. Find the ModePuzzle 30. Average Sales WaitPuzzle 31. Buying All the ProductsPuzzle 32. Tax CalculationsPuzzle 33. DepreciationPuzzle 34. Consultant BillingPuzzle 35. RequisitionPuzzle 36. Double DutyPuzzle 37. A Moving Average
    Chapter 5: Grouping Data
      Puzzle 38. Budgeting ReportPuzzle 39. Counting FishPuzzle 40. GraduationPuzzle 41. Pairs of StylesPuzzle 42. PepperoniPuzzle 43. PromoPuzzle 44. Blocks of SeatsPuzzle 45. UngroupingPuzzle 46. WidgetPuzzle 47. Two Out of ThreePuzzle 48. Budget Versus ActualPuzzle 49. Personnel ProblemPuzzle 50. Playing the PoniesPuzzle 51. Hotel Rooms

Review quotes

"This little collection of puzzles is something to bash your head against while awaiting your SQL epiphany."—Joe Celko

Product details

  • Edition: 1
  • Latest edition
  • Published: March 1, 1997
  • Language: English

About the author

JC

Joe Celko

Joe Celko served 10 years on ANSI/ISO SQL Standards Committee and contributed to the SQL-89 and SQL-92 Standards.

Mr. Celko is author a series of books on SQL and RDBMS for Elsevier/MKP. He is an independent consultant based in Austin, Texas.

He has written over 1200 columns in the computer trade and academic press, mostly dealing with data and databases.

Affiliations and expertise
Independent Consultant, Austin, Texas