The rowcounts were: 1) 999 - aurel's original version is 3.8.9 2) 1000 - Luuks non-recursive version, same for my own trial 3) 837 -the version with temp table 4) 838 - DRH;s version
and there is nothing to worry here. The main difference is explained by a mistake in the format parameter to the strftime function. In (1) and (2) that was '%%w' which is meaningles. In (4) this is changed to '%w' and that effectively filters out the sundays. Thanks DRH for the comments that clarify this intention. The remaining difference is because in (3) the final date is not incuded as start date on a seperate line. Still it is already there as end date.