Context: CREATE TABLE table_name_50 (runs_allowed INTEGER, rank VARCHAR, losses VARCHAR)
Question: How many runs allowed did the team ranked 2 with more than 2 losses have?
Answer: SELECT AVG(runs_allowed) FROM table_name_50 WHERE rank = 2 AND losses > 2