#### Finding Two Equal Sets of Data

Question: [Joe Celko’s Equal Sets Puzzle]Set theory has two symbols for subsets. One is a “horseshoe” on its side, which means that set A is contained within set B and

March 24, 1997

Question: [Joe Celko’s Equal Sets Puzzle]Set theory has two symbols for subsets. One is a “horseshoe” on its side, which means that set A is contained within set B and

March 24, 1997

Question: [Joe Celko’s Dataflow Diagrams Puzzle]Tom Bragg posted a version of this problem on the CASE Forum on CompuServe. You have a table of dataflow diagrams (DFDs), which has the

March 24, 1997

Question: [Joe Celko’s Milestones Puzzle]This puzzle, in a little different form, came from Brian Young. His system tracks a series of dates (milestones) for each particular type of service (tos)

March 24, 1997

Question: We are putting together a book with contributions from many Anthologies (identified by their contrnum). We want to find all Anthologies thathave articles in exactly two out of three

March 24, 1997

Question: How would I change the following statement to yieldonly unique values? select * FROM WEBDBASE where ST = ‘#State#’ AND #SPECIALTY# = ‘x’; Answer: You can’t get unique values

March 24, 1997

Question: How can I use SQL to specify a query like the example below: select * from mytable where column like ‘a[bc]’This should match both “ab” and “ac” but not

March 24, 1997

Question: How do I arrange to sort within a GROUP BY clauserather than over the complete result set, e.g. L0 PDV …… L90 PDV …… L180 PDV …… L270 PDV

March 24, 1997

Question: [Joe Celko’s Employment Agency Puzzle]You are running an employment agency that has requests for jobs and applications from candidates. Both of these forms include a list of the skills

March 24, 1997

Question: [Joe Celko’s Personnel Problem Puzzle]Daren Race was trying to aggregate the results from an aggregate result set using Gupta’s SQLBase and could not think of any way other than