Eric G. Miller writes:

> If max(period) for an organization yields the most recent reporting,
> I want to get whatever is the most recent report for each organization.

SELECT org_id, max(period) FROM reports GROUP BY org_id;

-- 
Peter Eisentraut   [EMAIL PROTECTED]   http://funkturm.homeip.net/~peter


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to