Results 1 to 3 of 3

Thread: Sql

  1. #1
    Join Date
    Apr 2003
    Posts
    43

    Unanswered: Sql

    Hi
    I want to run a SQL query on count.
    I have a 2 files one is an alcohol outlet and other is convenience stores. I want to check how many alcohol outlets at 0.5 mile radius are there around the stores, say . ex there are 3 alcohol outlets in 0.5 mile radius of a stores A, how do i get the number
    thanks for the help

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Sql

    Originally posted by namitao
    Hi
    I want to run a SQL query on count.
    I have a 2 files one is an alcohol outlet and other is convenience stores. I want to check how many alcohol outlets at 0.5 mile radius are there around the stores, say . ex there are 3 alcohol outlets in 0.5 mile radius of a stores A, how do i get the number
    thanks for the help
    Distance between 2 points (x1,y1) and (x2,y2) is SQRT( (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) )

  3. #3
    Join Date
    Jan 2003
    Location
    Pittsburgh, PA
    Posts
    86

    Re: Sql

    Do you have the longitude and latitude of each store from each file? You would need that piece of information in order to calculate the distances between two points on a sphere (such as the earth).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •