In this article, we will show you how to use PostgreSQL to predict stock price by employing univariate linear regression.