mirror of
https://gitlab.com/wheres-the-tp/server.git
synced 2026-01-25 06:14:55 -06:00
remove query from ddl
This commit is contained in:
parent
a4142988f7
commit
cc61d02804
1 changed files with 0 additions and 16 deletions
|
|
@ -114,19 +114,3 @@ INSERT INTO food_items (id, name, place_id, category, images, thumbImage, loc)
|
|||
);
|
||||
|
||||
INSERT INTO quantities SELECT id, current_timestamp, 'many' FROM food_items;
|
||||
|
||||
SELECT
|
||||
*,
|
||||
ST_AsGeoJSON(loc) as location,
|
||||
ST_Distance(
|
||||
loc,
|
||||
ST_GeogFromText('SRID=4326;POINT(-97.7286718 30.3033267)')
|
||||
) / 1609 as distance
|
||||
FROM food_items
|
||||
WHERE
|
||||
ST_DWithin(
|
||||
loc,
|
||||
ST_GeogFromText('SRID=4326;POINT(-97.7286718 30.3033267)'),
|
||||
10 * 1609
|
||||
)
|
||||
ORDER BY distance ASC;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue