jeśli some_value
to nazwa pola :
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
jeśli some_value
jest jakimś stałym ciągiem :
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