I have two tables. One (Widgets) has a list of widgets (ID, widget_name, color, etc…) and data about them.
The other one (Tests) has a list of tests run on the widgets (ID, date, info1, info2, etc…).
What I want to do is display the most recent TWO tests. I dont think i really need to use the table Widgets for this but i described it so you would know where im coming from.
I have constructed a “Totals” query that uses the MAX() function and displays the single most recent Date for each ID. I then can use this query to construct another query that displays useful information about the test that happened on that date for that widget. What i really need, though is to have the most recent two test dates for each widget.
If you need the two most recent tests overall, then
If you need the two most recent tests for each Widget, then