CLN: sql static method
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Not sure why my commits from #35224 are included in this PR. Maybe because I changed my email in config user.email. But the changes I made for this PR are in `sql.py`
 > Not sure why my commits from #35224 are included in this PR. Maybe because I changed my email in config user.email. But the changes I made for this PR are in `sql.py`

I'd guess it's because you created a new branch from your previous one and then added new commits on top of it, instead of resetting to upstream/master before starting new work.

You can get rid of unwanted commits with `git rebase -i upstream/master` and then dropping any commits you don't want (note that you'll then need to use the `-f` flag when pushing) > > Not sure why my commits from #35224 are included in this PR. Maybe because I changed my email in config user.email. But the changes I made for this PR are in `sql.py`
> 
> I'd guess it's because you created a new branch from your previous one and then added new commits on top of it, instead of resetting to upstream/master before starting new work.
> 
> You can get rid of unwanted commits with `git rebase -i upstream/master` and then dropping any commits you don't want (note that you'll then need to use the `-f` flag when pushing)

Thanks, I can do that, but the changes now look correct, and it does not conflict with the base branch, it's fine like this as well I guess? I think it should be fine, yes :) While you're here modifying these files, can you also add type annotations to the signatures you've changed (where possible)?