I'm a UK based database developer with over 18 years of experience in various databases, including Oracle, SQL Server, PostgreSQL and MySQL. I'm also an Azure certified data engineer with experience in ETL process.
I can certainly help you in this query to get the consecutive buy and average price.
Regards,
Kam