user: Question: Which District has a First elected of 1858, and a Result of Retired Republican Gain, and an Incumbent of William Millward?
Columns: ['District', 'Incumbent', 'Party', 'First elected', 'Result']
Types: ['text', 'text', 'text', 'real', 'text']
Sample row: ['Pennsylvania 1', 'Thomas B. Florence', 'Democratic', 1848.0, 'Retired Democratic Hold']
SQL:

assistant: SELECT "District" FROM "Table" WHERE "First elected" = 1858.0 AND "Result" = 'Retired Republican Gain' AND "Incumbent" = 'William Millward';