SQL
Notes on Structured Query Language
Created:
On SQL
- Modern Data Practice and the SQL Tradition | Florents Tselai
- 12 Common Mistakes and Missed Optimization Opportunities in SQL | Haki Benita
- I Don’t Need Your Query Language
- Your Database Skills Are Not ‘Good to Have’ And a hateful ode to Object-Relational Mappers
Learning resources
Select Star SQL “… is an interactive book which aims to be the best place on the internet for learning SQL. It is free of charge, free of ads and doesn’t require registration or downloads. It helps you learn by running queries against a real-world dataset to complete projects of consequence. It is not a mere reference page — it conveys a mental model for writing SQL”. Very nicely laid out (credits M. Buttrick of “Practical Typography”).
SQL Teaching - The easiest tutorial to learn SQL
SQLBolt - Learn SQL - Introduction to SQL … a series of interactive lessons and exercises designed to help you quickly learn SQL right in your browser. Related website - regexone
Advanced SQL window functions quiz
SQL style guide by Simon Holywell
How Does a Database Work? | Let’s Build a Simple Database
Learn SQL while solving crimes! SQL Police Department
SQL for Data Scientists in 100 Queries
SQL visualization/query/notebook tools
Redash – can be self hosted.
Franchise: a sql notebook –
runs local proxy on your system. the UI itself is on
franchise.cloud
website. Can
also run locally.
forbesmyester/esqlate – Build minimum viable admin panels quickly with just SQL. uses node.js proxy behind nginx. template queries are written using JSON and the “holes” are filled by user to get the results back. Users can also add new records.
- An advanced log file viewer for the small-scale
- Watch and analyze your log files from a terminal.
- No server. No setup. Still featureful.
- Many logging tools, like Splunk, provide great features but are optimized for large-scale deployments. They require installing and configuring servers before they can be effectively used. There is still a need for a robust log file analyzer for the terminal.
- Just point lnav to a directory and it will take care of the rest. File formats are automatically detected and compressed files are unpacked on the fly.
- Log files are a wealth of information, lnav can help highlight the parts that are important and filter out the noise.
Editors / IDEs
- TablePlus | Modern, Native Tool for Database Management (Native Mac Client).
- PopSQL - Modern, collaborative SQL editor for your team
- Metabase
- drawDB | Online database diagram editor and SQL generator; source.
- Harlequin: The SQL IDE for Your
Terminal. –
pipx install harlequin
Command line tools
- GitHub - dinedal/textql: Execute SQL against structured text like CSV or TSV
- xo/usql: universal command-line interface for SQL databases
- cube2222/octosql – OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases and file formats using SQL.
Translation tools
- Translate your SQL from one dialect to another [JOOQ.org/translate]
Frameworks
- Evidence - Business Intelligence as Code – “Build polished data products with SQL. Evidence is a lightweight framework for building data apps. It’s open source and free to get started.”
- lovasoa/SQLpage: SQL-only webapp builder, empowering data analysts to build websites and applications quickly
LLM
A Survey Paper Shi, Liang, Zhengju Tang, and Zhi Yang. “A survey on employing large language models for text-to-SQL tasks,” 2024. https://arxiv.org/abs/2407.15186.
Text-to-SQL parsing solves this issue by converting natural language queries into SQL queries, thus making database access more accessible for non-expert users. To take advantage of the recent developments in Large Language Models (LLMs), a range of new methods have emerged, with a primary focus on prompt engineering and fine-tuning. This survey provides a comprehensive overview of LLMs in text-to-SQL tasks, discussing benchmark datasets, prompt engineering, fine-tuning methods, and future research directions.
See also Query Languages