If you can export your data to SQLite first (my https://datasette.io/tools/db-to-sqlite tool can help with that) you can upload the SQLite database directly to ChatGPT Code Interpreter and have it run the queries for you, since sqlite3 is in the Python standard library If you do this, it will automatically retry with a new SQL query if it gets any error messages.
1. Used GPT-4 to build functions that pulled in sample datasets from my BigQuery.
2. Used GPT-4 to insert them into a sqlite database.
3. Upload the zip file into Code Interpreter.
4. Now I'm in an environment to quickly self-iterate on GPT-4 generated SQL.
It felt incredibly powerful. Previously I was developing with the latency of 100Gb+ tables – now the sqlite db responds instantly, and I don't even need to write the code.