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.

Create a SQL query from scratch

Create a SQL query from scratch

From the course: ChatGPT and SQL

Create a SQL query from scratch

- [Instructor] Hey everybody. In this video we're going to be talking about how a SQL analyst can use AI tools like ChatGPT and Google Bard to create SQL queries from scratch. So like we always do, I'm going to provide some context here. I'm telling it it's going to act as a SQL expert and it's going to be helping me, a non-SQL expert create some reporting. And the next thing I'm going to do is just describe the tables that we have. So we've got two tables that we need to work with. First table's called students. It's got these four columns. The second table is called revenue. It has these columns. I'm not saying anything like student ID is the column that they should be joined on. I've typically found that the AI tools are actually smart enough to figure this out, which is pretty impressive. It's one of the use cases that they tend to be a little bit better at. So let's ask it just a fairly simple question here and we'll say, can you create a query to pull a list of the most valuable…

Contents