ok thanks, I have done that but it returns every id in the
table? i just need it to select the last id number
<CFQUERY datasource="#application.ds#" Name="Show66">
SELECT *
FROM sms_records
WHERE NumberSent = '421365488' AND ID = (SELECT MAX(ID)AS ID
FROM sms_records GROUP BY ID)
</cfquery>