Hi Realtor.com is your best source for statistics. It is the largest and most comprehensive website for real estate listings. Trulia also has statistics. For very specific information ask your local REALTOR to put you on an automatic drip to send you the particular information you would like.
A Realtor can give you the up-to-the-minute sales in any town in MA, so long as they appear in the Multiple Listing Service; they are public sales. If you want to get all the sales in a town, including the private ones, they are available online, again accessible by a knowledgable agent. The private sales become available online about 2 weeks after closing.