I need to get a record of a table, where this record is what the date was entered last.
Of the genre:
SELECT Ped.Quantidade
FROM ped
WHERE data <= @data
But as I have several records it returns me all, when I just want the last one inserted by the date.