Skip to content

Commit 6627c18

Browse files
Rename 18 Birthday Problem.sql to 18 Birthday Problem Random Numbers.sql
1 parent dfeee42 commit 6627c18

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Permutations, Combinations, Sequences and Random Numbers/SQL Scripts/18 Birthday Problem.sql renamed to Permutations, Combinations, Sequences and Random Numbers/SQL Scripts/18 Birthday Problem Random Numbers.sql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ Last Updated: 07/07/2022
77
This script is written in SQL Server's T-SQL
88
99
10-
• Relational division is used to divide the #Birthday table and determine nearest matches
11-
• A non-equi self join is used to match birthdays
12-
• 50% is reached around the 23rd/24th person, 100% is reached around the 90th person
13-
• #BirthDaysHistory is not guaranteed to have each day, only days where there was a match
14-
• #BirthDaysHistory will never have day 1 as a match can never occur on this day
15-
• I have added the code to flash fill any missing dates at the end
10+
• Relational division is used to divide the #Birthday table and determine nearest matches
11+
• A non-equi self join is used to match birthdays
12+
• 50% is reached around the 23rd/24th person, 100% is reached around the 90th person
13+
• #BirthDaysHistory is not guaranteed to have each day, only days where there was a match
14+
• #BirthDaysHistory will never have day 1 as a match can never occur on this day
15+
• I have added the code to flash fill any missing dates at the end
1616
1717
**********************************************************************/
1818

@@ -150,4 +150,4 @@ SELECT a.PersonWhoMatchesFill,
150150
WHERE c.PersonWhoMatchesFill <= a.PersonWhoMatchesFill AND c.Percentile != '')
151151
) PercentileFill
152152
FROM #BirthdaysPercentile a
153-
ORDER BY 1;
153+
ORDER BY 1;

0 commit comments

Comments
 (0)