7 ms·
But what if I want to count all the 10.x requests, not sure I can bitshift in an SQL query.
by sunkencity 17y ago
But what if I want to count all the 10.x requests, not sure I can bitshift in an SQL query.
- cema 17y agoselect count(*) from ipTable where ip >= 167772160 and ip < 184549376 IP is four digits in a 256-base integer. You are looking for ips with the first digit 10. So, the value boundaries are: 167772160 = 256 * 256 * 256 * 10; 184549376 = 256 * 256 * 256 * 11.