QueryFlow (@getQueryFlow) header
QueryFlow (@getQueryFlow) profile picture

SQL editor, scheduler, and pipelines in one native Mac app. Daily notes for people who write queries.

Joined October 2026
Stop reading schema diagrams. We pointed QueryFlow at a public MySQL database nobody on the team had ever opened. 64 tables. No docs. Asked "what's in this database." It explained the schema. Asked for a query with a join. It wrote it, explained the join, ran it. Rows on screen in about a minute. Then hit Watch this and it pings Slack or email when the row count or a value changes. Or schedule it to land in S3, SFTP or your inbox every morning. Watch: youtu.be/x2gxwMklboU Try it free for 14 days: getqueryflow.com/?utm_source…
2
181
WHERE total > 100 fails in Postgres when total is an alias from your SELECT list: column "total" does not exist. WHERE runs before SELECT names anything. ORDER BY total works because sorting happens later. Repeat the expression in WHERE, or wrap the query and filter outside.
1
1
7
Three ways to number tied rows, same scores: row_number(): 1, 2, 3, 4 rank(): 1, 1, 3, 4 dense_rank(): 1, 1, 2, 3 rank leaves a gap after a tie. dense_rank doesn't. row_number breaks the tie arbitrarily unless you add a tiebreaker to ORDER BY.
1
3
You can now speak T-SQL, MySQL, PostgreSQL, Snowflake, BigQuery SQL and other dialects directly to @duckdb. I just released v0.7.0 of my polyglot extension for DuckDB. Now a connection selects an input dialect, and DuckDB executes the SQL as it is. github.com/tobilg/duckdb-pol…
4
8
2
77
2,168
Picking the dialect per connection is a nice touch for migrations, since old T-SQL reports can run as-is while you compare results in DuckDB. Curious how you handle functions with no clean equivalent.
2
pg_isready told my restore drill that Postgres was ready. The answer came from a server that was about to shut down. The drill restores the latest nightly dump into a throwaway container of the same image production runs, Supabase's Postgres 17. On first start, the entrypoint brings up a temporary server, runs the init scripts against it, stops it, and only then starts the real one. The official Postgres image does the same. That temporary server listens on the Unix socket and nothing else. So pg_isready without -h, which asks over the socket, can get "accepting connections" from the wrong server. My monthly drill on GitHub Actions went red twice before I caught it. On 3 November it died restoring roles with "the database system is shutting down". On 4 December pg_restore logged 737 errors, 733 of them "no connection to the server". The fix is pg_isready -h, so it asks over TCP. Only the final server listens there. And the rerun found the gap I'd actually built the drill for: the dump's row-level security policies name a second database role, and I'd only ever restored 1 of the 2. A real recovery would have died on that. Now it restores both, and checks pg_restore's errors before it trusts a row count. The run after that: 0 error lines.
4
1
4
218
That entrypoint trap catches a lot of restore scripts. Polling until a real SELECT 1 succeeds against the final server is safer than trusting pg_isready during first boot, since the init server answers too.
1
3
The part that stays with us is the testing. SQLite carries far more test code than library code, which is a big reason people trust a single file with real data.
2
QueryFlow retweeted
You can now speak T-SQL, MySQL, PostgreSQL, Snowflake, BigQuery SQL and other dialects directly to @duckdb. I just released v0.7.0 of my polyglot extension for DuckDB. Now a connection selects an input dialect, and DuckDB executes the SQL as it is. github.com/tobilg/duckdb-pol…
4
8
2
77
2,168
As a PostgreSQL expert, choosing SQLite for my lab’s personal CRM and productivity system was a tough architectural decision. Lightweight, powerful, and versatile, it has exceeded my expectations.
🤖 Made with AI
1
1
29
SQLite is a great fit when one person or one process owns the writes. Turning on WAL mode and using STRICT tables makes it feel even closer to the Postgres habits you already have.
1
3
BETWEEN 'A' AND 'C' on a text column won't return Carol. 'Carol' sorts after 'C', so it's past the upper bound. A name that's exactly 'C' makes it in, but Carol and Chen don't. For names starting with A through C, use name >= 'A' AND name < 'D'.
1
4
COUNT(1) and COUNT(*) return the same number. Both count rows. COUNT(column) is the one that's different, because it skips NULLs: SELECT count(*), count(phone) FROM customers; The gap between those two is how many customers have no phone. getqueryflow.com/?utm_source…
10
introducing setup-eatmydata: a one-line speedup for write-heavy GitHub Actions it makes fsync() a no-op for the rest of the job no durability, but CI runners are thrown away anyway SQLite inserts 7x faster, MySQL 3x, Postgres migrations 2x github.com/lockyer-labs/setu…
12
3
4
135
20,055
Worth knowing it works through LD_PRELOAD, so anything that skips libc keeps paying for fsync. Go binaries make raw syscalls, and a Postgres service container isn't a child of the job. Curious how you got the 2x on migrations there. fsync=off in the container?
3
Adding an index to a big Postgres table in prod? Use CREATE INDEX CONCURRENTLY. Plain CREATE INDEX blocks writes until it finishes. I learned that on a payments table while checkout writes piled up. Catch: it can't run in a transaction, and a failed build leaves an INVALID index to drop by hand.
2
2
311
Yep, and watch out if the migration uses IF NOT EXISTS. The retry sees the invalid one, skips it, and reports success. Easy to miss.
1
1
21
That one is nasty because the migration log says success. A quick check on pg_index.indisvalid right after the migration step catches it before the next deploy.
1
17
Not every business problem requires Machine Learning. Sometimes a well-structured Excel analysis, an SQL query or a Power BI dashboard is enough to uncover the issue. The goal of Data Analytics isn’t to use the most sophisticated tool. It’s to solve the problem effectively.
3
1
14
676
A GROUP BY at the right date grain answers more business questions than most models ever get the chance to. The hard part is usually agreeing on what counts as an active customer before anyone writes the query.
4
A major reason why MongoDB is where it is today, is because the Postgres folks fumbled the bag so bad, sometimes even engineers flee at the thought of setting one up. Before you come at me saying "skill issue", would you want to setup Postgres or MongoDB for a weekend prototype?
8
1
8
1,565
For a weekend prototype, SQLite or a one-line Docker Postgres gets you most of the way there, and the schema you skip on day one usually comes back as a migration on day ninety. Mongo's real edge was the onboarding, not the database.
7
We graduate students in Statistics, Mathematics, Computer Science, Economics and Actuarial Science. But how many leave university able to write SQL, build Power BI models, use Git and solve business problems with data? The gap deserves attention.
47
182
12
1,284
40,407
One fix that works is a single messy real dataset per course, with duplicate keys, nulls, and dates stored as text. Clean textbook tables teach SQL syntax, but cleaning a bad one is what teaches the actual job.
7
I still can't believe McKinsey was my dream company in college. I worked hard to intern there. Then I spent six months making PowerPoints, creating spreadsheets, and building financial models. Pointless back-and-forth approvals and office politics. I hated it, and I didn't feel like I was delivering any value. Then one day I opened a 500MB Excel file and crashed out. My team was using it as a database, and every update was being done by hand (updating a single entry could take 3–5 minutes while everything recalculated). When I asked why we were using Excel for this, the explanation was that we’d simply started with Excel and kept using it. At the time, I had just taken a database design class the semester before. So I decided to spend the week building a Python script that migrated everything into a proper SQL database. Updates became faster. Searching was easier. My teammates could actually query data instead of working through Excel formulas. It saved my team hours of spreadsheet work each week. I finally felt like I actually delivered value. I wanted more of my work to feel like that. That experience made me realize I could never work a job like that again and was a big inspiration for me to become a founder. Working on @instabox_sh now, I realize that I get the chance to solve those problems and deliver real value every single day, and I'm truly grateful. If you're someone at a company like McKinsey and feel like this, it's never too late to get out!!
14
2
61
3,150
The 3-5 minute recalcs are the visible cost. The quieter one is two copies of the workbook drifting apart until someone has to decide which numbers are real, and a SQL table with a primary key ends that argument.
3
QueryFlow retweeted
A Microsoft software setting can open up underlying data sets in government dashboards to the public, a collaborative investigation found, providing access to information that isn’t visible in visualizations and, in some cases, catching officials off guard. A review of Microsoft’s Power BI dashboards at various levels of government by an independent researcher uncovered what appeared to be troves of information about federal hiring, public housing residents, veterans, juveniles and crime victims accessible via the APIs, or application programming interfaces, associated with the publications. A sample of those findings were independently replicated by Scoop News Group without retrieving individual records. scoopmedia.co/4jxzsns
1
3
258
split_part pulls one piece out of a delimited string in Postgres, and since Postgres 14 a negative position counts from the end: SELECT split_part('exports/2026/report.csv', '/', -1); -- report.csv It's handy for file paths, email domains, and codes like TX-2026-0042.
1
1
27
Which SQL function took you way too long to discover? Ours is probably generate_series. It turns a date range into rows you can join to, so days with no orders show up as zeros instead of quietly disappearing from the chart. Reply with yours.
7