Database SQL Operation: OutcomePlanRecentItem.searchActivitiesByFactorClassificationAndDate
Description: | Returns a list of recent items for the given Classification and Factor where the date added is later than the given date. The returned list is grouped by Activity, and ordered by the most frequently added Activity for the given Factor and Classification
|
Sterotype: | nsmulti |
Select activityID, count(activityID) as activityTotal, activityType into :activityID, :count, :activityType from OutcomePlanRecentItem where dateAdded > :dateAdded AND factorID=:factorID and classificationID=:classificationID GROUP BY activityID, activityType ORDER BY activityTotal DESC
|