You do not need to know every SQL trick before using AI. But you need enough fundamentals to notice when AI is confidently wrong.
Know what a table represents
Understand grain, primary keys, foreign keys and how records relate. This is the foundation for spotting bad joins and inflated metrics.
Understand basic SQL logic
You should be comfortable reading SELECT, WHERE, JOIN, GROUP BY, HAVING, CASE and window functions even if AI writes the first draft.
Understand basic Python data work
Know what filtering, grouping, missing-value handling and type conversion are doing. Otherwise debugging generated Python becomes guesswork.
Understand metrics
Know the difference between a count, distinct count, rate, average, median and ratio. More importantly, know what the numerator and denominator mean.
Learn to validate
Validation is the skill that becomes more important when generation becomes easier. Reconcile totals. Test edge cases. Compare against known results.
Then add AI
Once the fundamentals are in place, AI becomes useful as a coding partner, explainer, reviewer, documentation assistant and workflow accelerator.
That is the philosophy behind my first ebook: become better at using AI without becoming dependent on it.
If you are starting from the career side, see How to Get Your First Data Analyst Job: A Practical Roadmap.