Task: Text to Code
Input (English): select the rows whose result record fuzzily matches to new seat republican gain . there is only one such row in the table . the first elected record of this unqiue row is none ( district created ) .
Output (English): and { only { filter_eq { all_rows ; result ; new seat republican gain } } ; eq { hop { filter_eq { all_rows ; result ; new seat republican gain } ; first elected } ; none ( district created ) } }