Skip to content

Commit fcd7117

Browse files
authored
Update datelist.sql
1 parent 06db9c4 commit fcd7117

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

datelist.sql

+3-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ $$ LANGUAGE plpgsql;
153153
3. Count the number of active days:
154154
Count the number of 1s in the result of the bitwise AND operation to determine how many days the user was active in the last 7 days.
155155
156-
4. By subtracting 1 from 128, you turn the binary number 10000000 into 01111111.
156+
4. By subtracting 1 from 128, you turn the binary number 10000000 into 01111111.
157+
158+
5. Finally, very simple just bitwise AND operator (&) to match if 1 is active in both nnumbers at same index, then keep it one and last we are just counting the set bits using our custom function - bit_counts
157159
158160
*/
159161

0 commit comments

Comments
 (0)