SQLAI.ai

customers who live inside 10 km radius of Times Square in New York

            
SELECT customerNumber, customerName, contactLastName, contactFirstName, phone, addressLine1, addressLine2, city, state, postalCode, country, salesRepEmployeeNumber, creditLimit FROM customers WHERE (6371 * acos(cos(radians(40.758896)) * cos(radians(latitude)) * cos(radians(longitude) - radians(-73.985136)) + sin(radians(40.758896)) * sin(radians(latitude)))) <= 10;
  • Public
  • ·
  • Wed, 25 Jan 2023 15:46:22 GMT