if some_value
je název pole :
SELECT id, min((tbl2.date_modified - tbl1.date_submitted)/86400), max(some_value)
FROM tbl1, tbl2, tbl3
WHERE tbl1.id = tbl2.fid
AND tbl1.id = tbl3.fid
GROUP BY tbl1.id
if some_value
je nějaký konstantní řetězec :
SELECT id, min((tbl2.date_modified - tbl1.date_submitted)/86400), 'some_value'
FROM tbl1, tbl2, tbl3
WHERE tbl1.id = tbl2.fid
AND tbl1.id = tbl3.fid
GROUP BY tbl1.id