I've got a table that looks almost like this (i got rid of the extra bits):
content_id (id)
page (int)
row_num (int)
rowspan (int)
col_num (int)
colspan (int)
content (text)
What it does is make up a table with content in each element. What I need is an SQL statement that will pick the largest sum of row_num and rowspan and the largest sum of the col_num and colspan. I will then know how many columns and rows the table has. Can this be done in one statement? Or will I need a loop?
Pseudo: select max(sum(row_num+rowspan)) from content
Thanks,
Chris