ChatGPT: Cheat Code for writing SQL

preview_player
Показать описание
ChatGPT is a game changer when it comes to learning SQL. Now you can give plain language instructions and ChatGPT will generate the SQL and can even act as the database. Prompts used in the video:

prompt to create the Database chat:
Imagine you are a Microsoft SQL Server. I type commands, and you reply with the result, and no other information or descriptions. Just the result.

Generator prompts:
create SQL statement to create a new database named VetClinic

create SQL statement to create 2 new tables 1 named Owners with columns for ID, name, phone number and address 1 named Pets, include the ID, pets name, type, owner and birthdate as columns. pets don't need owners

create SQL for sample data: 5 owners and 5 pets, have 1 pet without an owner and 1 owner without a pet

create SQL to find all pets connected to an owner, return the owners name and the pets name

create SQL to find all pets include the owner if there is one

create code for a stored procedure to return the pets birthdate and age of a pet in years, given the pet's name as an input

create code to call the stored procedure for pet Lonely

#chatgpt #sql #sqlserver
Рекомендации по теме
Комментарии
Автор

for a data analyst and both data scientist...thsi will be game changer extracxting all the queries seamlessly and submiting the projects before deadline....and the client is more happy to give more projects...amazing

ramanjeet