Photo by Growtika on Unsplash

5 Ways I Have Used ChatGPT in My Day-to-Day Work

Lauren Rosenthal
Published in
6 min readSep 12, 2023

--

It’s not an understatement to say that ChatGPT turned the world on its head when it was released back in November of 2022. It’s changed the way many people work and I’m not afraid to say that I’m one of them!

At first, it was simple curiosity that had me making an account.

“What’s all the fuss about this new-fangled tool?” I thought to myself. (Note: this probably isn’t exactly how it went down. I don’t tend to use words like new-fangled in my thoughts.)

But then I realized, “hey, this could be a game changer!” Back in November, I had a solid grasp on SQL but I still found myself stumped at times. Questions like, “How would I write a (complex) query that does xyz?” or
“What’s the difference between these two concepts and when would I use one over the other?” puzzled me and there wasn’t anywhere I could go to ask that exact question to find my answer. Sure, Google could give me resources like Stack Overflow, but that involved digging through a lot of questions and not always finding the answer I needed.

ChatGPT changed that.

Here are 5 ways that I’ve used ChatGPT in my data analysis work:

  1. Helping write a query using unfamiliar operators
  2. Giving assistance with Google Sheets/Excel formulas
  3. Explaining how certain functions or operators work
  4. Commenting my code
  5. Breaking down a query that used advanced concepts

1. Helping write a query using unfamiliar operators

The situation

I had data that I needed to group into broader categories but didn’t have a clear way to do that. I knew what I wanted to use (REGEXP) but wasn’t sure how to actually write the query.

The request

The response

ChatGPT gave me a query that used REGEXP in a CASE statement to create buckets for each cancelation reason.

2. Giving assistance with Google Sheets/Excel formulas

The situation

I’ll be the first to say, Google Sheets and Excel aren’t my strong suit. I can and do use them regularly but remembering how to write formulas and when to use them is a challenge. In this scenario, I needed a function to return everything after the comma in each cell within a column.

The request

The response

ChatGPT returned a formula that included the RIGHT function in conjunction with the FIND function to return everything after the comma in a cell.

3. Explaining how certain functions or operators work

The situation

For whatever reason, window functions were beyond my understanding for a long time but I knew that, if I could figure them out, they could be incredibly useful to my work. So of course, I went to ChatGPT to try to grasp the concept of window functions.

The request

The response

ChatGPT gave me the basic syntax and provided examples of different window functions and when they might be used.

4. Commenting my code

The situation

I had a long query with multiple CTEs and I really wanted to comment purposefully so I (or someone else) could go back and see what the query was meant to do.

The request

The response

ChatGPT went through my query and added comments to each CTE to explain the purpose of them.

5. Breaking down a query that used advanced concepts

The situation

I wanted to understand the purpose of GROUPING and how it works in a query with ROLLUP but after looking at the query further, I needed more information.

The request

The response

ChatGPT broke down each step of the query and explained exactly the purpose of those steps.

…however, I was still confused by GROUPING!

My advice is this…

Learn how to use ChatGPT to your advantage. That means:

  1. understanding exactly what you’re looking for
  2. being able to clearly explain your need in writing
  3. checking that the answer you’re receiving is accurate
  4. not solely relying on ChatGPT to do your work!

And a quick caution…

ChatGPT isn’t always right. I asked for it to explain the difference between ELSE 0 vs. ELSE NULL in the COUNT(CASE) pivot method and this was the first example it gave me:

In the explanation, ChatGPT tells me that the COUNT(CASE) will count how many times each customer placed an order containing product 123.

…but that’s not right. Since COUNT() simply counts the number of rows that have a non-NULL value, it would include rows where the output was 0, therefore inflating the number of times a customer placed an order containing product 123. When I responded with a clarification, ChatGPT returned:

The point here is that you can’t entirely rely on ChatGPT without having a solid grasp on the tool or domain you need help with.

So what does it all mean?

The bottom line is: use ChatGPT to your advantage but be skeptical. It’s a great tool to supplement your work but it shouldn’t replace critical thinking and your own expertise. Use ChatGPT to further your own understanding, increase your independence, and enhance your productivity but remember that ChatGPT is simply a (powerful) tool, not a substitute for your skill and knowledge.

P.S. If you’re interested in learning more about how you can use ChatGPT in your own work, Maven offers a free ChatGPT for Data Analytics course!

If you liked this, we’d love for you to subscribe to our publication.

And drop us a comment letting us know what you’d like to see next. You can also submit your own writing for us to promote, so don’t be shy if you would like to become a contributor. Check out submission instructions here.

Happy learning!

--

--

Lauren Rosenthal
Learning Data

I'm an Account Executive, Learning Guide, and Data Analyst at Maven Analytics. I love sharing my own journey and tips and tricks I picked up along the way.