SQL ระดับกลางด้วย AI
Jasmin Ludolf
Senior Data Science Content Developer
$$
💻 พัฒนาทักษะ SQL และ AI:
เรียงลำดับ จัดกลุ่ม กรองข้อมูล สรุปผล
หมวดหมู่แบบกำหนดเอง
$$
ทำได้ทั้งหมดด้วย Prompting!


⚠️ ขอสิทธิ์ให้ถูกต้องก่อนแชร์ข้อมูลบริบทกับ AI เสมอ

Prompt: แสดงชื่อภาพยนตร์ทั้งหมดเรียงตามตัวอักษร
SELECT title
FROM films
ORDER BY title ASC;
|title |
|--------------------------|
|#Horror |
|10 Cloverfield Lane |
|10 Days in a Madhouse |
|10 Things I Hate About You|
|10,000 B.C. |
|102 Dalmatians |
...
$$
$$
ASC เรียงจากน้อยไปมาก:Prompt: แสดงชื่อภาพยนตร์ทั้งหมดเรียงจากมากไปน้อย
SELECT title
FROM films
ORDER BY title DESC;
|title |
|--------------------------|
|Æon Flux |
|xXx: State of the Union |
|xXx (Triple X) |
|eXistenZ|
...
$$
$$
DESC สำหรับการเรียงจากมากไปน้อย$$
⬆ เรียงจากน้อยไปมาก
$$
⬇ ️ เรียงจากมากไปน้อย
SELECT title
FROM films
ORDER BY release_year;
|title |
|------------------------------|
|Intolerance: Love's Struggl...|
|Over the Hill to the Poorhouse|
|The Big Parade |
|Metropolis |
...
Prompt: แสดงชื่อภาพยนตร์และปีที่ออกฉาย เรียงตามปีที่ออกฉาย
SELECT title, release_year
FROM films
ORDER BY release_year;
|title |release_year|
|------------------------------|------------|
|Intolerance: Love's Struggle |1916 |
|Over the Hill to the Poorhouse|1920 |
|The Big Parade |1925 |
|Metropolis |1927 |
...
SELECT title, oscar
FROM awards
ORDER BY oscar DESC;
|title |oscar|
|-------------------------------|-----|
|Lord of the Rings:Return of ...|11 |
|Titanic |11 |
|Ben-Hur |11 |
SELECT title, oscar, bafta
FROM awards
ORDER BY oscar DESC, bafta DESC;
|title |oscar|bafta|
|--------------------|-----|-----|
|Lord of the Rings...|11 |2 |
|Ben-Hur |11 |1 |
|Titanic |11 |0 |
Prompt: แสดงชื่อภาพยนตร์และปีที่ออกฉาย เรียงตามปีจากมากไปน้อย แล้วเรียงตามชื่อจากน้อยไปมาก
SELECT title, release_year
FROM films
ORDER BY release_year DESC, title ASC;
|title |release_year|
|----------------|------------|
|10,000 B.C. | |
|A Touch of Frost| |
|Anger Management| |
|Animal Kingdom | |
...
SQL ระดับกลางด้วย AI