This is what i used:
SELECT
MAX(ACTIVITIES.StartDateTime) as LastStartDateTime,
ACTIVITIES.CategoryId
FROM Activities
GROUP BY ACTIVITIES.CategoryId
This query gave me the 731 results i wanted, however i also need the Activity.Id
I tried this but was unsuccessful:
SELECT
MAX(ACTIVITIES.StartDateTime) as LastStartDateTime,
ACTIVITIES.CategoryId,
ACTIVITIES.Id
FROM Activities
GROUP BY ACTIVITIES.CategoryId, ACTIVITIES.Id
This query results in 69378 results.
Am I still missing something here???