What you are looking for is the AMPscript function: LookUpOrderedRows().
To gather ALL the records from the DE, first you are going to need to add a field to the DE that is the same for each. I usually include a field 'Secret' and give it a default of '1' so I can retrieve all of the items inside the DE easily in an AMPscript lookup. You are also going to need to utilize another function as well: DataExtensionRowCount() if your DE will go above 2000 (default max row count).
Making something like:
%%[
SET @DEname = "yourDEName"
SET @DERowCount = DataExtensionRowCount(@DEname)
SET @rows = LookupOrderedRows(@DEname,@DERowCount,"yourSortField Desc","Secret","1")
]%%
This will pull the rowset. From there you just loop through it using a FOR loop to gather and display the individual rows.
%%[
FOR @i=1 TO Rowcount(@rows) DO
SET @Row = Row(@rows, @i)
SET @field = Field(@Row, "Fieldname")
NEXT @i
]%%
You can also achieve this via SSJS Retrieve, but this comes with its own restrictions (2500 row max) and much slower processing.
And then with slight adjustments, you can limit and sort utilizing the same LookUpOrderedRows() function.
See example (top 10 fruit, sorted by subclass):
%%[
SET @DEname = "food_for_sale"
SET @rows = LookupOrderedRows(@DEname, 10, "subclass ASC", "Type", "Fruit")
]%%
This can then be iterated through with a FOR loop same as described above.