This might reveal my technical mediocrity, but my approach:
1. Write the SQL that I think should mostly work
2. Try to run it
3. Fix errors with the help of docs, Stack Overflow, and now generative AI
4. Subconsciously learn whatever dialect this is to improve my performance on Step 1