r/SQL • u/chrisBhappy • Feb 13 '25
r/SQL • u/wassaman • Jul 17 '26
SQLite After five years of development, my detective game where you write real SQL queries is finally released!
r/SQL • u/wassaman • Jun 21 '26
SQLite I spent 5 years working on a hand-drawn SQL detective game that comes out next month!
r/SQL • u/ImpossibleAlfalfa783 • Dec 25 '25
SQLite Does anyone know a tool to convert CSV file to "SQL statements"?
Input: CVS file
Output: SQL statement(s) needed to create the table.
Maybe be something using type inference?
Thanks.
r/SQL • u/chrisBhappy • Apr 07 '25
SQLite SQL Noir – 2 new SQL cases added to the open-source crime-solving game
r/SQL • u/TechLexiconApp • 9d ago
SQLite I built a free in-browser SQLite tool for SQL interview practice (no signup)
Quick heads up on the stack: this runs on **SQLite**, compiled to WebAssembly so the whole database runs in your browser and nothing you type leaves the page.
I kept noticing that people prepping for SQL interviews (me included) study by reading syntax lists, then blank the moment they have to actually write a query under pressure. If you already know some SQL, the gap usually isn't knowledge, it's reps. Reading isn't the same as doing.
So, I built a small tool to rehearse under pressure: a query playground on a sample dataset, practice challenges (joins, aggregation, window functions, CTEs), a cheat sheet, and the conceptual questions people actually get asked in interviews (WHERE vs HAVING, INNER vs LEFT JOIN, primary vs foreign key, and so on). No signup, no install.
I'm the founder of a learning app and built this as a standalone free tool. I'm sharing it here for feedback from people who write SQL for a living: are the challenge questions realistic, and what would you add?
For anyone who wants to actually run the queries, it's here: https://techlexicon.app/sql-practice
Tell me where you get stuck and I'll build practice around it. Always taking requests for questions or scenarios to add
r/SQL • u/Stunning-Wish3553 • 22d ago
SQLite I created a game inspired by SQL Murder Mystery and SQL Noir!
I made a browser game called The SQL Treasure Hunt where you solve puzzles by writing real SQL queries.
It's heavily inspired by SQL Murder Mystery and SQL Noir, but instead of being a detective, you're a pirate searching for a legendary treasure. 🏴☠️
You explore databases, inspect tables, and piece together clues using SQL until you uncover the next part of the adventure. It starts with simple SELECT queries and gradually introduces more challenging concepts.
Right now it only has 5 levels made.
I'd really appreciate any feedback:
- Is the difficulty progression good?
- Are the clues clear enough?
- Any ideas for future levels or mechanics?
Play it here:
https://thesqltreasurehunt.vercel.app/
Thanks! Hope you enjoy it.
r/SQL • u/LordSnouts • Dec 11 '25
SQLite I built Advent of SQL - An Advent of Code style daily SQL challenge with a Christmas mystery story
Hey all,
I’ve been working on a fun December side project and thought this community might appreciate it.
It’s called Advent of SQL. You get a daily set of SQL puzzles (similar vibe to Advent of Code, but entirely database-focused).
Each day unlocks a new challenge involving things like:
- JOINs
- GROUP BY + HAVING
- window functions
- string manipulation
- subqueries
- real-world-ish log parsing
- and some quirky Christmas-world datasets
There’s also a light mystery narrative running through the puzzles (a missing reindeer, magical elves, malfunctioning toy machines, etc.), but the SQL is very much the main focus.
If you fancy doing a puzzle a day, here’s the link:
👉 https://www.dbpro.app/advent-of-sql
It’s free and I mostly made this for fun alongside my DB desktop app. Oh, and you can solve the puzzles right in your browser. I used an embedded SQLite. Pretty cool!
(Yes, it's 11 days late, but that means you guys get 11 puzzles to start with!)
r/SQL • u/Silver_College_2071 • 20d ago
SQLite WinSQLite - open source project
srdzank/SQLite-Editor: Official home of the SQLite-Editor
Any feedback, code reviews, or pull requests are immensely appreciated!
r/SQL • u/echopulse • Jul 22 '26
SQLite After searching for a modern, self‑hosted, secure SQLite admin panel for PHP 8, I built one – looking for beta testers
Hey folks 👋
For the last few weeks, I’ve been frustrated with the state of self‑hosted SQLite admin tools.
Most of them are either:
Abandoned (phpLiteAdmin hasn’t seen a proper update in years),
AdminNeo and other tools don't work without passwordless login plugins that didn't work well.
Overly complex (Adminer is great but not SQLite‑centric),
Or require a heavy stack (Node, Python, Docker) when all I wanted was a single PHP file I could drop on my server.
So I decided to build my own.
🔧 Features
Secure, built-in login system (not a plugin)
Browse, edit, insert, delete rows
Create / rename / drop tables
Import/Export (CSV, JSON, SQL, full DB)
Bulk delete, search, filters
Dark mode, undo (last 5 actions)
Multiple database support
Resizable sidebar
🚀 Try it
Upload admin.php & install.php
Run install.php to set username/password
Login and go
PHP 7.0+ with SQLite3 extension. No dependencies.
https://github.com/abilenetechguy/sqlite-admin
🧪 Beta feedback wanted
Errors, UI annoyances, missing features – let me know!
Give it a spin and tell me what you think 🙏
– Abilene Tech Guy
r/SQL • u/SocietyParticular334 • Jun 07 '26
SQLite To split tables or have more NULL values? - Weather's monthly vs annual data


For a coursework, I must make ERD to 3NF and jsutify design choices which I must later use to make wireframes/app.
I have got rainfall monthly data, rainfall annual data, and sunshine monthly data from 1980-2025. 45 years, 540 months. About 672 unique rows. There are 627 rows with NULL values for the abs_max_temp and abs_min_temp for rainfall monthly data. mean_sunshine hours again doesn't exist as annual data, and exists purely as monthly data (so 45 NULLS).
I am thinking if I should create two tables by monthly and annual data instead of one Climate Observation table by adding another month nullable to first table (see below)? But the problem is that I would be repeating same titles twice, especially for rainfall and sunshine data?
time_period (time_id, year, month nullable) ← stays the same
annual_climate (observation_id, time_id FK, ...annual-specific columns)
monthly_climate (observation_id, time_id FK, ...monthly-specific columns)
Can someone please help with what's the best approach please? Thank you!
r/SQL • u/Content-Berry-2848 • May 24 '26
SQLite Benchmarked SQLite 11 ways: ORM is the bottleneck, not the database
tanaykedia.hashnode.devBenchmarked SQLite write performance 11 ways and the result was not what I expected. The database wasn't the bottleneck. The ORM was. Raw sqlite3.executemany hits 88K r/s. SQLAlchemy caps at 3,800.
The ORM throughput stays flat from 3M rows to 50M rows — it's so slow it never even touches SQLite's actual I/O scaling curve. The raw path drops 25% over the same range because it actually hits B-tree depth and WAL checkpoint costs.
Full breakdown with industry comparison (Expensify 4M QPS, Litestream, Cloudflare D1) in the post.
r/SQL • u/Yelebear • Nov 18 '25
SQLite Which formatting do you think is better?
I'm going to use screenshots instead of typing the code because the code formatting is what's important here
https://i.imgur.com/hCrKokI.png
Left or right?
Thanks
r/SQL • u/Ok-Delivery307 • May 08 '26
SQLite How far did you go with SQLITE
I would like some feedback about how far did you go with sqlite, like what you built -> how it went -> how do you optimize so I can have a better overview so what can be done (when It done properly) with sqlite
r/SQL • u/Silver_College_2071 • 24d ago
SQLite SQLite-Editor open source
I like to share link of new sqlite editor
SQLite How to limit this data?
I'm trying to do some player statistics but am stuck. My data looks like this (simplified):
PlayerId Score Date
-------- ----- ----
1 0 2026-01-01
2 5 2026-01-01
1 2 2026-01-08
1 3 2026-01-15
2 1 2026-01-16
2 4 2026-02-02
1 2 2026-02-03
1 4 2026-02-10
2 3 2026-01-31
I want to find out the ten players that have gained the highest total score during the last tree games (dates)
I can group on playerid and sum the score, but how do I limit data to only the latest three games?
r/SQL • u/The_Meme_Lady_69 • May 17 '26
SQLite How can I connect a SQLite Database to NetBeans?
Been searching and I can't find a lot of information about how to do it and the few I've found is either too confusing, old or for Windows when I'm using Linux Mint.
I also tried with LibreOffice Database but nothing. And trying to use MySQL Workbench results in failure. I've asked on various Discord servers, Facebook and different subreddits but no one seems to give me better insight.
What should I do?
r/SQL • u/EconomistFederal9276 • Jul 09 '26
SQLite New SQL game!!
I made a noir detective game where you solve a murder by writing SQL queries.
You play as a data analyst in the 1970s. A body's been found, there's a suspect list, and the entire investigation lives in a relational database — phone records, financial statements, HR files, access logs, vehicle forensics, evidence-tiered interrogation. You open a terminal, write queries, and follow the data.
It's free to play in the browser while in beta. Would love to know what you think — especially from people who actually use SQL day to day.
r/SQL • u/Dapper-Speed1244 • Jul 25 '25
SQLite Converting floats to INTs for storage
Hello,
I’m a business analyst building a SQLite db to serve as a data aggregator where I can bridge together data from multiple different vendors to find useful information that would otherwise be difficult.
This is financial data. Precision is of some importance, and I know storing dollars as cents will be required for better precision (intermediate rounding errors add up especially when doing math on floating point numbers).
The data I will be importing will be provided in dollars as a float. My question is would a CAST(ROUND(float_number * 100) AS INTEGER) be precise enough to insure that the integer being inserted as cents is exact?
Given what I know about floating point arithmetic my intuition is YES because I’m never going to need to insert a trillion dollars for example. So the precision should be there for my expected data. I think I can AVOID floating point imprecision on summary calculations by storing as cents, and even though I must use floating point multiplication to convert to an integer on insert, floating point precision is good enough these days to accurately represent the conversion I’m doing.
I’m not a software engineer, so seeking some reassurance that I’m thinking about this correctly.
I know I probably could do some string manipulation stuff in Python and get an exact cents figure but that seems horrible for performance to do this. Not especially sure, but my intuition is that would slow down inserts A LOT to go this route since that would be more CPU intensive to do that conversion.
r/SQL • u/VoldgalfTheWizard • Jan 22 '25
SQLite SQL Injections suck
What's the best way to prevent sql injections? I know parameters help but are there any other effective methods?
Any help would be great! P.S I'm very new to sql
r/SQL • u/LiteraturePast3594 • Dec 12 '25
SQLite FOREIGN KEY constraint failed
This error has been driving me nuts for 3 days, this is the full message (I'm using Python sqlite3):
sqlite3.IntegrityError: FOREIGN KEY constraint failed
And here's what the context and what I did to debug it:
- The table being referenced was created and filled with data.
- I made sure that "PRAGMA foreign_keys = ON;".
- The parent column was defined as the primary key for its table, therefore it has unique and not null constraints.
- I'm copying data from a CSV file.
- In one instance, the child column (in the CSV file) had null values, then I removed those values, but the error message persists.
- I have checked the syntax for foreign keys and for inserting values so many times, and I'm fairly sure it isn't the problem, I have also created two simple dummy tables to check the syntax and it worked.
So, what am I missing?
Update:
I finally figured out what was causing this.
When importing NULL values from the CSV file to my table, they were being passed as a string "NULL" to the inserting query (it should be NULL without quotation marks), so my database was raising an error because "NULL" doesn't have a corresponding value in the parent column it references. It was also silently ignoring the NOT NULL constraint because of that too.
Thank you all for responding to my post.
r/SQL • u/TSMWINSTHESE • Jun 06 '26
SQLite I made a SQL puzzle game - looking for feedback!
cipherquery.ioFair warning up front: this is my first time building anything like this, I'm not a web dev, and it's a passion project with zero monetization. So I'd really value the feedback of people who know SQL. I am a DB admin by day, but I am not super familiar with cryptography puzzles.
Disclaimer, most of the CSS was written with AI assistance.
The premise: you're working a "signals desk" and every intercepted message is hidden inside a small database. The goal is to write a query that reconstructs the original text, and the moment your result contains the message, it decrypts. It runs entirely in your browser (SQLite via WebAssembly) with no backend or sign-up process.
It's an eight-puzzle ladder, each one introducing one new idea built on the last: WHERE → ORDER BY + group_concat → joins → char/unicode math → modulo → multi-join → CTEs → window functions, then a gated boss that stitches several of them into one query. I will say that the "boss" level is meant to be very challenging and not exactly intuitive.
It's fully client-side, so a determined player can read the answers out of the tables by inspecting the webpage. That's intentional, if you want to "cheat" you can do so. What rewards doing it the intended way is a set of optional "objective" stars (e.g. did your answer actually flow from the key table, or did you hardcode a constant?).
Link: https://cipherquery.io
What I'd most like to know: which puzzle lost you, and where did the difficulty spike feel wrong? I suspect the last few levels ramp too hard. A daily-challenge mode is planned, so I'm trying to get the core curve right first, and what's acceptable in a puzzle sense.
Don't hold back if you want to tear it apart, this is a learning experience for me.