Thomas Lumley shared a smart way to fit generalized linear models by a SQL query to a database. I have to say frankly that I can no longer deal with the math now, but this post did remind me of a blog post written by my friend Yixuan Qiu in 2011, in which he showed how to fit a linear regression by using SQL queries. There might be a lot of existing research in this area, which I don’t know, but I was quite impressed by Yixuan’s post when I first saw it. It was a totally new perspective to me.