---
title: Solving Statistical Computing Problems with SQL
date: '2018-07-30'
slug: sql-stats-computing
---

Thomas Lumley [shared a smart way](https://twitter.com/tslumley/status/1023850297028829184) 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](https://statr.me/2011/10/large-regression/), 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.

![A different perspective](https://slides.yihui.org/gif/ultraman.gif)
