I use MySQL, and I am looking for a way to get global maximum and minimum values (for the whole table) from two columns (e.g., posxand posy) using only one query.
posx
posy
Plain:
SELECT MIN(posx), MIN(posy), MAX(posx), MAX(posy) FROM table
SELECT MIN(colx) AS minimum, MAX(colx) AS maximum, MIN(coly) AS minimum, MAX(coly) AS maximum FROM table
It really is not harder than it sounds.
SELECT MIN(posx), MAX(posx), MIN(posy), MAX(posy) FROM yourtable
select max(posx), min(posy) from table