SELECT COUNT(*) c, city, countryLabel, NTH(1, latitude) lat, NTH(1, longitude) lngFROM ( SELECT INTEGER(PARSE_IP(contributor_ip)) AS clientIpNum, INTEGER(PARSE_IP(contributor_ip)/(256*256)) AS classB FROM [publicdata:samples.wikipedia] WHERE contributor_ip IS NOT NULL ) AS aJOIN EACH [fh-bigquery:geocode.geolite_city_bq_b2b] AS bON a.classB = b.classBWHERE a.clientIpNum BETWEEN b.startIpNum AND b.endIpNumAND city != ''GROUP BY city, countryLabelORDER BY 1 DESC
Use promo code NEXT1720 to save $300 off general admission
No comments :
Post a Comment