
PUZZLE 10 WAGES OF SIN 37
PUZZLE
10 WAGES OF SIN
Luke Tymowski, a Canadian programmer, posted an interesting problem
on the MS ACCESS Forum on CompuServe in November 1994. He was
working on a pension fund problem. In SQL-92, the table involved
would look like this:
CREATE TABLE Pensions
(sin CHAR(10) NOT NULL,
pen_year INTEGER NOT NULL,
month_cnt INTEGER DEFAULT 0 NOT NULL
CHECK (month_cnt BETWEEN 0 AND 12),
earnings DECIMAL (8,2) DEFAULT 0.00 NOT NULL);
The SIN column is the Social Insurance Number, which is something
like the Social Security Number (SSN) used in the United States to
identify taxpayers. The pen_year column is the calendar year of ...