What is the Views 3 equivalent of the MySQL Limit 1 in order to return just the latest record I want to display data from the latest activity record for each contact in a report created using views 3 / Drupal 7

In MySQL I'd use sorts and limit to give me the result I want (the following is not the full query, which of course would have joins)...

SELECT column_name FROM table_name
ORDER BY column_name DESC
LIMIT 1;


What is the equivalent in Views 3? I know how to sort, but how do I limit?

I don't think that limiting the results on a page is the answer - I'm quite happy with a table with 200 rows, it is just that I want only one row for each contact displaying the data from just the latest activity record associated with that contact.

Any clues anyone?
To get the query in your question you would use a pager:


Select 'Use pager' in the admin UI
Select 'Display a specified number of items'
Click 'Apply'
Enter '1' for "Items per page" on the settings screen.
Save


I suspect you might be talking more about grouping, though, and that the SQL you've got isn't representative of the query you actually want to run.

If that's the case, you should be able to accomplish what you need buy turning on aggregation, and then setting appropriate values for each field's grouping options.