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
Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)Photo by QueryFlow (@getQueryFlow)
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
5
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
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
76
2,087
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
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
257
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
TIL one more reason to not use ENUM and SET in MySQL, and I updated my blog post "MySQL Best Practice" with a link to Bug 122066 (thanks Ke Han for reporting this). jfg-mysql.blogspot.com/2026/…
2
1
1
75
DISTINCT applies to the whole row, not just the first column. SELECT DISTINCT customer, status FROM orders; A customer with a paid order and a refunded one shows up twice. For one row per customer, GROUP BY customer and decide what status means. getqueryflow.com/?utm_source…
4
When you only need to know whether a row exists, ask that directly. count(*) > 0 counts every match first. EXISTS can stop at the first one: SELECT EXISTS ( SELECT 1 FROM orders WHERE customer_id = 42 ); Same true or false, and less work when there are lots of matches.
6
QueryFlow retweeted
Postgres 19 finally brings REPACK (CONCURRENTLY) 🐘 It looks amazing in our lab (DBLab Forge): - 17x faster than pg_repack - 336x less lag than pg_squeeze - Plays nice with autovacuum The catch: one slow query can freeze your app or wipe out hours of work. 👇
3
9
36
1,603
INSERT ... SELECT matches columns by position, not by name. INSERT INTO archive (email, name) SELECT name, email FROM customers; Both columns are text, so nothing errors. You just end up with names in the email column. Keep both lists in the same order and it can't happen.
1
4
Snowflake previewed violation actions for data quality checks on Dec 1. When a data metric function check fails, it can skip downstream dynamic table refreshes and keep their last results, or start a task for the bad rows. Bad data can stop at the check, not the dashboard.
1
5
Replying to @PostgreSQL
@PostgreSQL 19 lets VACUUM use streaming reads on GIN indexes. The tests reveal that it's 2.2x faster cleanup once index outgrows cache (26.6 GiB, ~25s to ~11s). A good example of measuring where a change matters and some critical changes needed in v19 .. @MSFTforPostgres techcommunity.microsoft.com/…
1
3
11
364
current_date in Postgres follows the session's TimeZone setting, not the time zone you're sitting in. If the session runs in UTC, a report run at 7:30 PM in Chicago already thinks it's tomorrow. For the local date, use: (now() AT TIME ZONE 'America/Chicago')::date
1
16