From the course: ChatGPT and SQL

Unlock this course with a free trial

Join today to access over 25,000 courses taught by industry experts.

Debug and troubleshoot SQL code

Debug and troubleshoot SQL code

From the course: ChatGPT and SQL

Debug and troubleshoot SQL code

- [Instructor] Hi everyone. In this video we're going to be walking through another use case where SQL Analysts can use tools like Chat GPT or Google Bard in their workflow to improve their performance. And the use case we're going to be talking about today is using chat GPT or other tools to troubleshoot your errors in your SQL code. So let's jump into MySQL Workbench. I'll show you this pretty simple query. Don't worry about the data here, it's just dummy data. But basically we are pulling data from the student's table, joining it to student attribution and to revenue. And we're basically counting the students, summing the revenue and then doing a calculation to get revenue per student. And then we are including attribution clean, and we're grouping by that attribution clean first column. And then we're going to be ordering by the number of students descending. So our biggest groups get at the top. And you can see this query runs fine right now. So I'm going to intentionally put in…

Contents