sql, select only needed fields.