Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
create table place ( id int not null primary key, latitude double precision not null, longitude double precision not null ); insert into place values (1, 41.40338, 2.17403); with distances as ( select point(latitude,longitude)<->point(41, 2) distance from place ) select * from distances where distance < 100 order by distance;

Stuck with a problem? Got Error? Ask AI support!

Copy Clear