3 ms·
I usually start out by pasting a simple (correct, executing) stub query in, prefacing it with "this query does <general thing I'm trying to do>", and then go st
by lxgr 2y ago
I usually start out by pasting a simple (correct, executing) stub query in, prefacing it with "this query does <general thing I'm trying to do>", and then go step by step: "Filter for x", "now add a join to this other table <definition>" etc., and build the larger query iteratively.
Another pattern I've found pretty useful: "This isn't working. Build a small sample dataset to exercise your query, and I'll paste the results back to you so we can both see what might be going wrong."
Basically, I treat it as an intern, not as an oracle of truth.
- disgruntledphd2 2y agoHuh that's helpful, thanks! To be fair I mostly only need it for new dialects but my successful attempts with other tools seem to follow the same pattern.