Code
MariaDB [junk]> select avg(lat) `Average lat` from (select max(lat) `lat` from zips where state_prefix like 'MO') x natural join (select min(lat) `lat` from zips where state_prefix like 'MO') y;
[/URL]+-------------+
| Average lat |
+-------------+
| NULL |
+-------------+
1 row in set (0.08 sec)
i dont understand why this is null
what i'm trying to do is figure out the (max latitude + min latitude) / 2
table is zips
field is lat
i need to select take the upper half of the "lat"s but i cant figure out how to find the middle lattitude, as you may know with mysql i can't take the nice easy oracle path and avg(max(lat),min(lat))
This post was edited by Ideophobe on Mar 10 2016 06:21am