HCLTech interview question

Moving average in sql and pyspark. One python coding in string i think