bungeebones — 2012-06-22T23:59:51-04:00 — #1
I am using two columns to select from. One is link_id and the other is timestamp. There are multiple entries of the same link and I want only the most recent posting each link in the list. I haven't been able to figure it out.
Here is what I have so far
timestamp > ' 2012-06-16 00:00:00'
timestamp < '2012-06-30 00:00:00'
GROUP BY link_id
I've tried a bunch of different things and nothing is working
Thanks in advance
r937 — 2012-06-23T00:11:44-04:00 — #2
, MAX(`timestamp`) AS latest
WHERE `timestamp` > '2012-06-16 00:00:00'
AND `timestamp` < '2012-06-30 00:00:00'
BY latest DESC
note TIMESTAMP is a reserved word -- you really should rename that column
bungeebones — 2012-06-23T08:38:47-04:00 — #3
Thanks! Awesome! and I took your advice and renamed the column