Task: Text to Code
Input (English): select the rows whose party record fuzzily matches to democratic . among these rows , select the rows whose first elected record is equal to 1974 . the number of such rows is 2 .
Output (English): eq { count { filter_eq { filter_eq { all_rows ; party ; democratic } ; first elected ; 1974 } } ; 2 }