In the files agn.us.txt, ainv.us.txt, ale.us.txt contain daily stock data of NYSE and NASDAQ from 2005 to 2017. Every line has the structure: Date, Open, High, Low, Close, Volume, OpenInt Using Apache Spark we have to execute the following queries:
1)Find the average for open, close and volume for every month and every different stock
2)Find the number of days that open value of every stock was above 35 dollars
3)Find the days with highest value on open and volume for every stock
4)Find the years with highest open value and lowest close value for every stock
We asnwer these queries as follows Answer for first question -> Query1.py. Same for the rest three queries and answers.