Hacker News with Generative AI: SQL

Usql: Universal command-line interface for SQL databases (github.com/xo)
Universal command-line interface for SQL databases
SQL style guide by Simon Holywell (sqlstyle.guide)
You can use this set of guidelines, fork them or make your own - the key here is that you pick a style and stick to it. To suggest changes or fix bugs please open an issue or pull request on GitHub.
Steps in Writing Analytical SQL Queries (crunchydata.com)
It is never immediately obvious how to go from a simple SQL query to a complex one -- especially if it involves intricate calculations.
Rust for tokenising and parsing (xnacly.me)
I am currently writing a analysis tool for Sql: sqleibniz, specifically for the sqlite dialect.
Why I love Rust for tokenising and parsing (xnacly.me)
I am currently writing a analysis tool for Sql: sqleibniz, specifically for the sqlite dialect.
I love Rust for tokenising and parsing (xnacly.me)
I am currently writing a analysis tool for Sql: sqleibniz, specifically for the sqlite dialect.
Show HN: IMDb SQL Best Movie Finder (imdb-sql.com)
DuckDB-GSheets: Read and Write Google Sheets in Pure SQL (github.com/evidence-dev)
Show HN: Intelcave – Business intelligence, redefined using AI (intelcave.com)
Chat with your database, create insightful collections and write SQL queries using simple conversational language.
INNER JOIN ON vs WHERE clause (2009) (stackoverflow.com)
For simplicity, assume all relevant fields are NOT NULL.
Graph Retrieval Using Postgres Recursive CTEs (sheshbabu.com)
Did you know you can use Postgres as a graph database for certain usecases?
Show HN: ClickHouse User Defined Table Function in Python (github.com/auxten)
I'm a SQL enthusiast and I want to query everything with SQL. This project is a collection of my experiments to query different data sources with SQL.
Show HN: CSV SQL Graph – Graph visualization of views (github.com/punnerud)
CSV SQL Graph is a web application that allows users to upload CSV files, convert them into SQLite tables, visualize table relationships, and perform SQL queries.
Sampling with SQL (moertel.com)
Sampling is one of the most powerful tools you can wield to extract meaning from large datasets.
The Prompt() Function: Use the Power of LLMs with SQL (motherduck.com)
In recent years, the costs associated with running large language models (LLMs) have fallen significantly, making advanced natural language processing techniques more accessible than ever before.
PRQL: A simple, powerful, pipelined SQL replacement (prql-lang.org)
Null Is Not the Billion Dollar Mistake. A Counter-Rant (2015) (jooq.org)
A short while ago, I gave this answer on Quora. The question was “What is the significance of NULL in SQL?” and most of the existing answers went on about citing C.J. Date or Tony Hoare and unanimously declared NULL as “evil”.
A Beginner's Guide to the True Order of SQL Operations (jooq.org)
The SQL language is very intuitive. Until it isn’t.
SQL Tips and Tricks (github.com/ben-n93)
A (somewhat opinionated) list of SQL tips and tricks I've picked up over the years.
Google Zanzibar: Implementing the Check API and Expand API Using .NET (2023) (bytefish.de)
In the previous articles we have seen how to implement a very simplified Relationship-based Access Control using a Google Zanzibar-like data model and some SQL queries. It worked good, and I quite like what we ended up with. But it doesn't let us define an effictive ACL, because at the moment we need to materialize all relations in the database.
Why avoid where id in with variable number of bind parameters on Postgres (kaveland.no)
In my post about batch operations, I used the where id = any(:ids) pattern, with ids bound to a JDBC array. I’ve gotten questions about that afterwards, asking why I do it like that, instead of using in (:id1, :id2, ...). Many libraries can take care of the dynamic SQL generation for you, so often you can just write in (:ids), just like the array example.
Window Functions for Data Analysis with Postgres (crunchydata.com)
SQL makes sense when it's working on a single row, or even when it's aggregating across multiple rows. But what happens when you want to compare between rows of something you've already calculated? Or make groups of data and query those? Enter window functions.
Are You Qualified to Use Null in SQL? (agentm.github.io)
Take this quiz to find out.
SQL powered operating system instrumentation, monitoring, and analytics (github.com/osquery)
osquery is a SQL powered operating system instrumentation, monitoring, and analytics framework.
Sqlc: Compile SQL to type-safe code (sqlc.dev)
sqlc generates fully type-safe idiomatic code from SQL.
Show HN: Node.js ORM to query SQL database through an array-like API (github.com/tilyupo)
Query SQL database through an array-like API.
Show HN: Using SQL's Turing completeness to build Tetris (github.com/nuno-faria)
A complete implementation of Tetris in a SQL query.
TypedSQL: Make your raw SQL queries type-safe with Prisma ORM (prisma.io)
Google's new pipe syntax in SQL (simonwillison.net)
Pipe Syntax in SQL (research.google)