Making query directly to the transfers model instead of doing tmp table.