i got a table, fields of "Criteria", "Type", "Date"(unix stamp)
i want to group the Criteria together, get a count of them and display when the last Criteria was added "Date"
But the query i use is telling me the date when the first Criteria was added, not the last and i cannot workout how to make it display the last added Criteria date.
I have had this problem before and not been able to work it out as well.
Query im using:
SELECT
COUNT(sch_Criteria) AS Countof,
sch_Type, sch_Date
FROM
tblsearches
GROUP BY
sch_Criteria, sch_Type
ORDER BY sch_Date DESC
e.g. if i have 3 records of criteria = "dunno" and dates of december 2000, march 2001, january 2004. When it groups ot together, it displays the one "dunno" with the date of december 2000 when i want it to show the date of january 2004.