user: Question: When Republican ticket was John P. Lomenzo who ran for the Socialist Workers ticket?
Columns: ['Office', 'Republican ticket', 'Democratic ticket', 'Liberal ticket', 'Conservative ticket', 'Socialist Workers ticket', 'Socialist Labor ticket']
Types: ['text', 'text', 'text', 'text', 'text', 'text', 'text']
Sample row: ['Governor', 'Nelson A. Rockefeller', 'Robert M. Morgenthau', 'Robert M. Morgenthau', 'David H. Jaquith', 'Richard Garza', 'Eric Hass']
SQL:

assistant: SELECT "Socialist Workers ticket" FROM "Table" WHERE "Republican ticket" = 'John P. Lomenzo';