Changing paging created by scaffold

hello
the scaffolding created a list
def list
@trade_pages, @trades = paginate :trades, :per_page => 50
end

how to i change it so that the @trades will contain the result of a
custom sql?
thanks
seede