wenn some_value
ist ein Feldname :
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
wenn some_value
ist ein konstanter String :
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