5月7号是什么星座| 马头琴是什么族的乐器| 月经提前半个月来是什么原因| 股票五行属什么| 黑洞是什么| 经期能吃什么水果| 阿尔马尔是什么药| 什么是便血| 鸡精是什么做的| 黑脚鸡是什么品种| 师长相当于地方什么级别| 二甲医院是什么意思| 2段和3段奶粉有什么区别| 排长是什么军衔| 甲状腺肿物是什么意思| 鸡汤放什么调料| 黑藻是什么植物| 发扬什么精神| 庚日是什么意思啊| 柴鸡是什么鸡| jessica是什么意思| 带状疱疹看什么科| 怀孕早期有什么症状| 为什么有的女人欲太强| 1984年属鼠是什么命| 什么的小火车| 换药挂什么科| 意犹未尽什么意思| 气口是什么意思| 肺炎吃什么药有效| 现在是什么季节| 夏天感冒咳嗽吃什么药| 什么是冤亲债主| 地主之谊是什么意思| 睡觉口苦是什么原因| 印度的全称是什么| 阴道炎什么症状| urban是什么牌子| 什么东西能补肾壮阳| 海澜之家属于什么档次| 市政协主席是什么级别| 什么情况下需做肠镜| 胰岛素起什么作用| 什么经验| 隐血试验阴性是什么意思| 孕妇适合吃什么水果| 猫咪能吃什么水果| 趴在桌子上睡觉有什么坏处| 泰坦尼克号女主角叫什么| 焕字五行属什么| 节节草有什么作用| 什么季节喝白茶| 朱元璋为什么不杀汤和| 大象的天敌是什么动物| 什么海翻江| ai是什么元素| 伊朗用什么货币| 膝盖疼痛吃什么药好| 田共念什么| 节令是什么意思| 绿豆汤不能和什么一起吃| 喜欢蓝色的女人是什么性格| 埋单是什么意思| 什么食物胶原蛋白含量高| 月经期间头疼是什么原因| 处暑是什么节气| 什么可以治早泄| 范冰冰和洪金宝什么关系| 异丙醇是什么东西| 属猪男配什么属相最好| 胡饼是什么| 剥离是什么意思| 奶不够吃是什么原因| 七月一号是什么星座| 绿加红是什么颜色| 山竹什么样的好| 胖子从12楼掉下来会变什么| 拧巴什么意思| 囊性结节是什么| 卫青为什么被灭九族| 什么水果寒凉性| 中国什么姓氏人口最多| gxg是什么牌子| 令人唏嘘是什么意思| 什么是人设| 路征和景甜什么关系| 79年属羊的是什么命| 什么的骆驼| 及什么意思| 什么牌子的益生菌最好| 睡觉喜欢流口水是什么原因| 女性乳房痒是什么原因| 氨糖是什么| 什么因果才会有双胞胎| 广州地铁什么时候停运| 为什么怀不上孩子| 喉咙咳出血是什么原因| 兔子能吃什么水果| 小妮子是什么意思| 2026年是什么命| 长宽高用什么字母表示| 疟疾病是什么病| 对宫星座是什么意思| 晚上梦到蛇是什么意思| 万宝龙皮带算什么档次| 打豆豆什么意思| 看鼻子挂什么科| 什么的银发| 余事勿取是什么意思| 侯字五行属什么| 高考报名号是什么| 梦见妖魔鬼怪是什么意思| 乳腺结节挂什么科| 什么牙什么牙| 脑血栓不能吃什么水果| 官员出狱后靠什么生活| 经常拉肚子吃什么药| 牙周炎有什么症状| hbsag是什么意思| 婚检能检查出什么| 8月27日什么星座| 大便溏稀吃什么药| 肠道功能紊乱吃什么药| 伤感是什么意思| 吴用属什么生肖| 如如不动是什么意思| 脚肿腿肿是什么原因引起的| 家里为什么有小飞虫| 2010年属什么生肖| 时蔬是什么菜| 梦到捉鱼是什么意思| 脸上起红疙瘩是什么原因| 民政局局长什么级别| 国防部长是什么级别| 菊花茶泡了为什么会变绿| 康庄大道是什么意思| 甲油胶是什么| 雨云是什么字| 布施什么意思| hdv是什么病毒| 手足口病是什么病毒| 清鱼是什么鱼| 芝兰是什么意思| 十一月三号是什么星座| 孔雀喜欢吃什么食物| 狗屎运是什么意思| 三月十二是什么星座| 腹胀是什么病的前兆| 副词什么意思| 梦见小猪仔什么意思| 琋字五行属什么| 糖尿病能吃什么主食| 泡沫尿是什么原因| 扁豆长什么样子图片| 航空器是什么| 维生素h是什么| 老人过生日送什么礼物好| 9.3什么星座| 丝状疣是什么| 什么是潮吹| 口腔扁平苔藓是什么原因造成的| 丙肝为什么会自愈| 额头凉凉的是什么原因| 头疼是什么原因引起| 足及念什么| 早上起床口苦口干是什么原因| 什么血型可以生出o型血| 双肺纹理增多增粗是什么病| 叶公好龙的好是什么意思| 多彩的什么| 现在什么时辰| 纯阳之人有什么特征| 丁克什么意思| 贡生相当于现在的什么| 室内传导阻滞什么意思| 夏至是什么节日| 2010年什么年| 莫非的近义词是什么| 面部脂溢性皮炎用什么药| 牙膏属于什么类商品| 综合基础知识考什么| 久之的之是什么意思| 中医经方是什么意思| 7月有什么活动| 拉肚子挂什么科室| 脸上长黑斑是什么原因引起的| 我战胜了什么| 上将是什么级别| 鸡五行属什么| 甘草片不能和什么药一起吃| 吃大虾不能吃什么| 子宫内膜薄吃什么| 人间四月芳菲尽的尽是什么意思| 熟啤酒是什么意思| 杳什么意思| 一个入一个肉念什么| 黄褐斑是什么样的图片| 正念是什么| 多愁善感什么意思| 腾字五行属什么| 急性肠胃炎可以吃什么| 益生菌什么牌子的好| 聚酯纤维是什么材料| 西沙必利片治什么病| 中项是什么意思| energy是什么牌子| 吐血是什么原因引起的| 劫数是什么意思| 南方有什么生肖| 白带正常是什么颜色| 周围神经病是什么症状| 空调自动关机是什么原因| 吐白沫是什么原因| 女生安全期是什么意思| 头晕呕吐是什么原因引起的| 吃完晚饭就犯困是什么原因| 水痘是由什么引起的| 绝经三年了突然又出血了什么原因| 维生素c什么时候吃| 宫颈息肉不切除有什么危害| 阴虱卵长什么样图片| 宝宝大便发白是什么原因| 斋醮是什么意思| 极化是什么意思| 维纳斯是什么意思| 牙龈翻瓣术是什么意思| 玉髓是什么材质| 一什么铅笔| 梦到老公出轨是什么意思| 侮辱什么意思| 一直拉肚子是什么原因| 纺锤形是什么形状| baumwolle是什么面料| 什么水果利尿| 黑色素缺失吃什么补充最快| 既寿永昌什么意思| 老公护着家人说明什么| 维生素a是什么| 鼻子大的男人说明什么| 尿素偏高是什么意思| 皮下男是什么意思| 什么之交| 双向是什么意思| 腘窝囊肿挂什么科| 荨麻疹能吃什么食物| 什么米叫粳米| 伤口溃烂不愈合用什么药| 控制血糖吃什么食物| 别扭是什么意思| 尿白细胞弱阳性是什么意思| 什么是虫草| 胃烧灼吃什么立马缓解| 鸭肚是鸭的什么部位| 醉酒当歌什么意思| 咳痰带血是什么原因| 处女膜是什么样的| 什么是目标| 阿咖酚散是什么药| 治疗灰指甲用什么药| 胃镜取活检意味着什么| 马来玉是什么玉| 牛后腿肉适合做什么| 频次是什么意思| 算五行缺什么免费测试| 百度
 

“汉字盛典”故宫黄易尺牍研究国际学术研讨会在济...

百度 统计显示,截至昨日,沪深两市共有429家公司披露了2017年年报,其中,有150家公司归属母公司股东的净利润、支付给职工以及为职工支付的现金和研发费用总额较2016年增长率跑赢GDP增速,显示出较高的成长潜力。

And how to use this amazing tool to enhance our SQL skills.



Using ChatGPT to Learn SQL
Image by Editor | Microsoft Designer

 

ChatGPT can do many cool things. One of them is writing code.?You only need to give the right instruction and ChatGPT will do the job for you.

If you want to learn SQL, ChatGPT is a great resource to get started. It can help you create SQL queries using natural language, solve any coding questions you might have or even help you understand pre-defined queries that you do not understand.

In this article, I will outline how you can use ChatGPT to learn SQL and become proficient in this valuable skill.

Let’s figure it out together!????????

First things first, so… what’s exactly ChatGPT?

ChatGPT is a large language model trained by OpenAI. It is capable of generating human-like text based on the input it receives and can be used to answer questions and engage in conversations with people.

So basically, we can take advantage of its knowledge — and its capacity to tell us anything in a very simple and?human?way —?to understand SQL and learn from it.

 

#Step 1: Set up ChatGPT

 

To get started with ChatGPT, you’ll need to sign up for an account?here.

 

Using ChatGPT to learn SQL
Signing Up for ChatGPT display.

 

You’ll have to give your email address and phone number to start using ChatGPT.

 

#Step 2: Learn how to interact with ChatGPT

 

Once you have ChatGPT enabled, you should see the following display:

 

Using ChatGPT to learn SQL
Screenshot of the ChatGPT chat display.

 

In the lower input box, we can write anything to start interacting with ChatGPT. As I will be disturbing her — or him — for a while, I’ll start apologizing in advance ;)

 

Using ChatGPT to learn SQL
Self-made gif. ChatGPT answering my first message.

 

#Step 3: Ask anything you can imagine — and it will answer you.

 

So now, we can start asking ChatGPT anything. I will focus on learning SQL. There are 5 main things we can ask to improve our SQL skills by using ChatGPT.

 

1. Explain to us any concept or commands in SQL

 

When crashing into a new programming language, we usually have a lot of doubts and confusion about every command.?ChatGPT can help us understand any command through easy explanations and give us as many examples of its usage as we request.

Let’s start with the most basic thing in SQL — the?SELECT?command.


Explain me shortly what is the?SELECT?command and an example of how to use it


ChatGPT answers a short answer explaining the?SELECT?command and gives the most basic example:?SELECT * FROM

 

Using ChatGPT to learn SQL
Screenshot of the ChatGPT chat.

 

However, I can further ask for the?SELECT?command.


Explain me what is the?SELECT?command and some examples showing how to use it


And as you can observe in the following image, ChatGPT explains the basics of the command and gives us some examples of usage.

 

Using ChatGPT to learn SQL
Screenshot of the ChatGPT chat. Giving more examples of the SELECT command.

 

You can try to ask any command you can imagine of, for instance a more challenging command such as?HAVING?.


Give me some examples of the HAVING command in SQL


And ChatGPT answers with several examples like the following ones:

  1. To find the names and salaries of all employees who make more than the average salary, you might use a query like this:
SELECT 
     name, 
     salary
FROM employees
GROUP BY name
HAVING salary > (SELECT AVG(salary) FROM employees);

 

2. To find the names of all customers who have placed more than 10 orders in the past year, you might use a query like this.

SELECT 
     name 
FROM customers 
WHERE customer_id 
IN 
(
  SELECT customer_id 
  FROM orders 
  WHERE date >= DATEADD(year, -1, GETDATE()) 
  GROUP BY customer_id 
  HAVING COUNT(*) > 10
);

 

Of course, we can keep asking for more explanations and more examples. Try any other command you can think of, and it will answer right away.

 

2. You can ask how to do something in SQL and ChatGPT will let you know what command (or commands) to use.

 

I can ask how to do a specific action, and ChatGPT will let me know what command I need to use.


I want to merge two tables, what command should I use in SQL?


And ChatGPT answers me to use any join command, as you can observe in the following picture.

 

Using ChatGPT to learn SQL
Screenshot of the ChatGPT chat. Explaning how to merge two tables.

 

However, I know I just want to join two tables when the rows have coinciding values in some specific columns. In this case, I can ask again and get to know what command should I use.


I want to join two tables and just get the data that have coinciding values in some given columns.


Hence, ChatGPT let me know only the?INNER JOINallows me to do that as you can observe in the following image:

 

Using ChatGPT to learn SQL
Screenshot of the ChatGPT chat. Explaning how to merge two tables and just mantaining the coinciding values.

 

And it gives me the corresponding query:

SELECT 
    *
FROM table1
INNER JOIN table2
   ON  table1.id = table2.id
   AND table1.name = table2.name;

 

3. You can ask ChatGPT to create a query using natural language

 

Now let’s imagine I know what result I need but I do not have any kind of idea how to formulate that query.?I can simply explain what I want to do to ChatGPT and it will give me a structure to follow.?Hence, I can learn how to structure queries following the examples of ChatGPT.


Explain to me how to create a SQL query that computes the most expensive cities in Europe having a table with the prices of different items in each city.


ChatGPT answers me right away, as you can observe in the following image.

 

Using ChatGPT to learn SQL

 

ChatGPT gives me an example of a query and explains what this query does.

 

4. You can ask ChatGPT that explains you how a query works.

 

Now let’s imagine you get to do the work from a workmate who is sick but you do not understand his queries — some people code in a messy way or you can just feel lazy and not want to waste a lot of time understanding other people’s queries.

That’s normal —?and you can use ChatGPT to avoid this task. We can easily ask ChatGPT to explain a given query.

Let’s imagine we want to understand what the following query does:

 



What does the following query do: [Insert Query here]


ChatGPT just answers right away:

 

Using ChatGPT to learn SQL
Screenshot of the ChatGPT chat. It explains what a given query does.

 

As you can observe in the previous image, ChatGPT explains what this query does step by step.

First, it explains all contained subqueries and what they do. Then it explains the final query and how it uses the previous subqueries to merge all the data.?We can even ask for more detailed explanations in a given subquery.


Can you further explain what the second subquery of the previous query does?


Using ChatGPT to learn SQL
Screenshot of the ChatGPT chat. It further explains what the second subquery of the given query does.

 

As you can observe in the previous image, ChatGPT explains in a detailed way what the second subquery performs.

You can challenge ChatGPT with any query you can imagine of!

 

5. You can ask ChatGPT to challenge you with exercises.

 

For me, the best part of ChatGPT is asking for some exercises and answers to practice and test your skills. It can even tell you when are you doing good — or not.


Can you give me some exercises to practice SQL


Using ChatGPT to learn SQL
Screenshot of ChatGPT giving me some exercises to practice SQL.

 

Now ChatGPT tells me some problems to perform. In this case, I can try to solve the first one and ask ChatGPT if my solution is correct.


Is the following query correct to the answer of the first previous exercise [Insert Query]


ChatGPT will answer and write away whether it is correct and why.

 

Using ChatGPT to learn SQL
Screenshot of ChatGPT answering if the query I have coded is correct or not.

 

I can ask for the correct answer to each of the previous examples:


Can you give me the correct answer to the previous exercises?


And as you can observe in the following image, ChatGPT will give me all the correct queries to perform.

 

Using ChatGPT to learn SQL

 

???Notice that the answer that ChatGPT is providing me and the one I provided to be checked are completely different.

 

Conclusion

 

SQL is a valuable skill to have in today’s data-driven world.?By using ChatGPT to learn the basics and practice your skills, you can become proficient in SQL.?With continued learning and practice, you can continue to expand your skills and perform a leap forward in your data professional life using this tool.

Let me know if ChatGPT surprises you with some other good features. I will read you in the comments! :D

Data always has a better idea — trust it.

 
 
Josep Ferrer is an analytics engineer from Barcelona. He graduated in physics engineering and is currently working in the Data Science field applied to human mobility. He is a part-time content creator focused on data science and technology.

 
Original. Reposted with permission.
 



提成是什么 胸闷挂什么科 来大姨妈吃什么水果 送产妇什么礼物最合适 战国时期是什么时候
色丁布是什么面料 深度睡眠是什么意思 酌情是什么意思 乍一看是什么意思 皮肤自愈能力差缺什么
什么牌子的床垫好 什么血型可以生出o型血 剌是什么意思 女人更年期吃什么药调理最好 炖鸡汤放什么材料
传导阻滞是什么意思 右眼睛跳是什么预兆 1953属什么生肖 畏光是什么意思 记忆力减退吃什么药效果好
股骨头坏死有什么好办法治疗吗qingzhougame.com 为什么人一瘦就会漂亮hcv9jop7ns3r.cn 心里不舒服挂什么科jasonfriends.com 疝气有什么症状imcecn.com 历经是什么意思cj623037.com
ha什么意思hcv8jop9ns7r.cn 朱字五行属什么hcv9jop6ns6r.cn 胚根发育成什么wuhaiwuya.com 7代表什么意思hcv9jop6ns8r.cn 冷冻是什么意思hcv9jop7ns1r.cn
张韶涵什么星座fenrenren.com 左手小指疼痛预兆什么hcv9jop1ns5r.cn 皮肤变白是什么原因qingzhougame.com 什么毛什么血hcv8jop1ns7r.cn 四面八方指什么生肖96micro.com
专班是什么意思96micro.com 什么时候可以考研fenrenren.com 苦荞是什么植物hcv8jop9ns1r.cn 黑茶金花是什么菌hcv7jop6ns7r.cn 过敏性鼻炎用什么药最好hcv9jop4ns4r.cn
百度