I have a table with three columns
fk_id,
sort_column,
value_column
for each fk__id_ I'd like to retrieve the first 5 records order by the sort_column
I've tried this for several hours now and I don't have the slightest idea on how to do it
I'm using MySQL
I'd be grateful for any help
Marc
EDIT: I should probably clarify the output format I'm looking for: I want two columns, fk id and value_column fk id would just be repeated 5 times for each value
the reason I wanna do this is because later on I need to do some calculations on this results set such as calculating the average and the sum for each fk_id