Table: election_results_1962_8
Columns: office
republican_ticket
democratic_ticket
liberal_ticket
conservative_ticket
socialist_workers_ticket
socialist_labor_ticket

Question: Who ran under the Democratic ticket when Edward R. Dudley ran under the Liberal ticket?
SQL: SELECT "democratic_ticket" FROM election_results_1962_8 WHERE "liberal_ticket" = 'edward r. dudley'

Question: When John Emanuel ran under the Socialist Labor ticket who ran under the Democratic ticket?
SQL: SELECT "democratic_ticket" FROM election_results_1962_8 WHERE "socialist_labor_ticket" = 'john emanuel'

Question: What was the office up for election when Sylvia Weinstein ran under the Socialist Workers ticket?
SQL: SELECT "office" FROM election_results_1962_8 WHERE "socialist_workers_ticket" = 'sylvia weinstein'

Question: Who ran under the Socialist Labor ticket when Robert M. Morgenthau ran for the Democratic ticket?
SQL: SELECT "socialist_labor_ticket" FROM election_results_1962_8 WHERE "democratic_ticket" = 'robert m. morgenthau'

Question: When Republican ticket was John P. Lomenzo who ran for the Socialist Workers ticket?
SQL: SELECT "socialist_workers_ticket" FROM election_results_1962_8 WHERE "republican_ticket" = 'john p. lomenzo'