Toni Van Remortel wrote:assuming that datum is a date using a DATE or DATETIME or TIMESTAMP type,> Hi,
> I have a table which contains subscriptions from students, bu they are
> tagged with a date (so I have a kind of history).
> Both 'email' and 'datum' are primary keys.
> How can I get a full list of every subscription, but only the last of each
> My SQL knowledge is too small to solve this, I'm affraid. Any help welcome.
then you can use the MAX function:
select email, max(datum) from subscriptions group by email;
If you are not using any of the above column types, you may not be able to
do what you want.
_ _ _ _
(_|| | |(_|><