do you know the pokemon dataset (with legendary column)? If yes, give me sql code (can be run on spark) for the following: pivot by type_1 column, and summarize these: mean of attack, mean of defense, grouped by legendary

 There should be exactly 5 paragraphs separated by the markdown divider: ***.
user