context
stringlengths 27
489
| answer
stringlengths 18
557
| question_th
stringlengths 8
226
| question_en
stringlengths 12
244
|
---|---|---|---|
CREATE TABLE storm (name VARCHAR, max_speed VARCHAR, storm_id VARCHAR); CREATE TABLE affected_region (storm_id VARCHAR)
|
SELECT T1.name, T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY COUNT(*) DESC LIMIT 1
|
ชื่อพายุและความเร็วสูงสุดที่ส่งผลกระทบต่อภูมิภาคจำนวนมากที่สุดคืออะไร
|
What is the storm name and max speed which affected the greatest number of regions?
|
CREATE TABLE affected_region (name VARCHAR, storm_id VARCHAR); CREATE TABLE storm (name VARCHAR, storm_id VARCHAR)
|
SELECT name FROM storm WHERE NOT storm_id IN (SELECT storm_id FROM affected_region)
|
แสดงชื่อพายุที่ไม่ส่งผลกระทบต่อภูมิภาคเป็นประวัติการณ์
|
Show the name of storms which don't have affected region in record.
|
CREATE TABLE affected_region (storm_id VARCHAR, number_city_affected INTEGER); CREATE TABLE storm (name VARCHAR, storm_id VARCHAR)
|
SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING SUM(T2.number_city_affected) >= 10
|
แสดงชื่อพายุอย่างน้อยสองภูมิภาคและ 10 เมืองที่ได้รับผลกระทบ
|
Show storm name with at least two regions and 10 cities affected.
|
CREATE TABLE storm (name VARCHAR); CREATE TABLE affected_region (storm_id VARCHAR); CREATE TABLE storm (name VARCHAR, storm_id VARCHAR)
|
SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING COUNT(*) >= 2
|
แสดงชื่อพายุทั้งหมด ยกเว้นที่มีพื้นที่ได้รับผลกระทบอย่างน้อยสองแห่ง
|
Show all storm names except for those with at least two affected regions.
|
CREATE TABLE region (region_name VARCHAR, region_id VARCHAR); CREATE TABLE affected_region (region_id VARCHAR, storm_id VARCHAR); CREATE TABLE storm (storm_id VARCHAR, number_deaths VARCHAR)
|
SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10
|
ชื่อภูมิภาคที่ได้รับผลกระทบจากพายุและมีผู้เสียชีวิตอย่างน้อย 10 รายคืออะไร
|
What are the region names affected by the storm with a number of deaths of least 10?
|
CREATE TABLE region (region_id VARCHAR, region_name VARCHAR); CREATE TABLE affected_region (region_id VARCHAR, storm_id VARCHAR); CREATE TABLE storm (name VARCHAR, storm_id VARCHAR)
|
SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark'
|
แสดงชื่อพายุทั้งหมดที่ส่งผลต่อภูมิภาค "เดนมาร์ก"
|
Show all storm names affecting region "Denmark".
|
CREATE TABLE region (region_name VARCHAR, region_id VARCHAR); CREATE TABLE affected_region (region_id VARCHAR)
|
SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING COUNT(*) >= 2
|
แสดงชื่อภูมิภาคที่มีพายุอย่างน้อย 2 ลูก
|
Show the region name with at least two storms.
|
CREATE TABLE region (region_name VARCHAR, region_id VARCHAR); CREATE TABLE affected_region (region_id VARCHAR, storm_id VARCHAR); CREATE TABLE storm (storm_id VARCHAR, Number_Deaths VARCHAR)
|
SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1
|
ค้นหาชื่อของภูมิภาคที่ได้รับผลกระทบจากพายุที่คร่าชีวิตผู้คนไปมากที่สุด
|
Find the names of the regions which were affected by the storm that killed the greatest number of people.
|
CREATE TABLE storm (Name VARCHAR, storm_id VARCHAR); CREATE TABLE affected_region (region_id VARCHAR, storm_id VARCHAR); CREATE TABLE region (region_id VARCHAR, Region_name VARCHAR)
|
SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania'
|
ค้นหาชื่อพายุที่ส่งผลกระทบต่อทั้งภูมิภาคอัฟกานิสถานและแอลเบเนีย
|
Find the name of the storm that affected both Afghanistan and Albania regions.
|
CREATE TABLE county (Id VARCHAR)
|
SELECT COUNT(*) FROM county
|
มีทั้งหมดกี่จังหวัด?
|
How many counties are there in total?
|
CREATE TABLE county (County_name VARCHAR, Population VARCHAR)
|
SELECT County_name, Population FROM county
|
แสดงชื่อมณฑลและจำนวนประชากรของทุกมณฑล
|
Show the county name and population of all counties.
|
CREATE TABLE county (Population INTEGER)
|
SELECT AVG(Population) FROM county
|
แสดงจำนวนประชากรเฉลี่ยของทุกมณฑล
|
Show the average population of all counties.
|
CREATE TABLE county (Population INTEGER)
|
SELECT MAX(Population), MIN(Population) FROM county
|
ส่งกลับจำนวนประชากรสูงสุดและต่ำสุดในทุกเทศมณฑล
|
Return the maximum and minimum population among all counties.
|
CREATE TABLE election (District VARCHAR)
|
SELECT DISTINCT District FROM election
|
แสดงเขตเลือกตั้งที่แตกต่างกันทั้งหมด
|
Show all the distinct districts for elections.
|
CREATE TABLE county (Zip_code VARCHAR, County_name VARCHAR)
|
SELECT Zip_code FROM county WHERE County_name = "Howard"
|
แสดงรหัสไปรษณีย์ของเทศมณฑล ชื่อ "Howard"
|
Show the zip code of the county with name "Howard".
|
CREATE TABLE election (Delegate VARCHAR, District VARCHAR)
|
SELECT Delegate FROM election WHERE District = 1
|
แสดงผู้แทนจากเขต 1 ในการเลือกตั้ง
|
Show the delegate from district 1 in election.
|
CREATE TABLE election (Delegate VARCHAR, Committee VARCHAR)
|
SELECT Delegate, Committee FROM election
|
แสดงข้อมูลผู้แทนและคณะกรรมการการเลือกตั้ง
|
Show the delegate and committee information of elections.
|
CREATE TABLE party (Governor VARCHAR)
|
SELECT COUNT(DISTINCT Governor) FROM party
|
มีผู้ว่าราชการที่แตกต่างกันกี่คน?
|
How many distinct governors are there?
|
CREATE TABLE party (Lieutenant_Governor VARCHAR, Comptroller VARCHAR, Party VARCHAR)
|
SELECT Lieutenant_Governor, Comptroller FROM party WHERE Party = "Democratic"
|
แสดงรองผู้ว่าการและผู้ควบคุมจากพรรคประชาธิปัตย์
|
Show the lieutenant governor and comptroller from the democratic party.
|
CREATE TABLE party (YEAR VARCHAR, Governor VARCHAR)
|
SELECT DISTINCT YEAR FROM party WHERE Governor = "Eliot Spitzer"
|
ผู้ว่าการ "เอเลียต สปิตเซอร์" เป็นผู้ว่าราชการในปีใดที่แตกต่างกัน
|
In which distinct years was the governor "Eliot Spitzer"?
|
CREATE TABLE election (Id VARCHAR)
|
SELECT * FROM election
|
แสดงข้อมูลทั้งหมดเกี่ยวกับการเลือกตั้ง
|
Show all the information about election.
|
CREATE TABLE election (Delegate VARCHAR, District VARCHAR); CREATE TABLE county (County_name VARCHAR, County_id VARCHAR)
|
SELECT T2.Delegate, T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District
|
แสดงผู้แทนและชื่อเขตที่พวกเขาอยู่
|
Show the delegates and the names of county they belong to.
|
CREATE TABLE election (Delegate VARCHAR, District VARCHAR); CREATE TABLE county (County_id VARCHAR, Population INTEGER)
|
SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000
|
ผู้แทนคนไหนมาจากเทศมณฑลที่มีประชากรน้อยกว่า 100,000 คน
|
Which delegates are from counties with population smaller than 100000?
|
CREATE TABLE election (Delegate VARCHAR, District VARCHAR); CREATE TABLE county (County_id VARCHAR, Population INTEGER)
|
SELECT COUNT(DISTINCT T2.Delegate) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population > 50000
|
มีผู้แทนที่แตกต่างกันกี่คนจากมณฑลที่มีประชากรมากกว่า 50,000 คน
|
How many distinct delegates are from counties with population larger than 50000?
|
CREATE TABLE election (District VARCHAR, Committee VARCHAR); CREATE TABLE county (County_name VARCHAR, County_id VARCHAR)
|
SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T2.Committee = "Appropriations"
|
มณฑลที่ผู้แทนในคณะกรรมการ "การจัดสรร" มีชื่ออะไรบ้าง?
|
What are the names of the county that the delegates on "Appropriations" committee belong to?
|
CREATE TABLE election (Delegate VARCHAR, Party VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR)
|
SELECT T1.Delegate, T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID
|
แสดงผู้ร่วมประชุมและชื่อของฝ่ายที่พวกเขาอยู่
|
Show the delegates and the names of the party they belong to.
|
CREATE TABLE party (Governor VARCHAR, Party_ID VARCHAR); CREATE TABLE election (Party VARCHAR, District VARCHAR)
|
SELECT T2.Governor FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1
|
ใครคือผู้ว่าการของฝ่ายต่างๆ ที่เกี่ยวข้องกับผู้แทนจากเขต 1?
|
Who were the governors of the parties associated with delegates from district 1?
|
CREATE TABLE party (Comptroller VARCHAR, Party_ID VARCHAR); CREATE TABLE election (Party VARCHAR, District VARCHAR)
|
SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2
|
ใครคือผู้ควบคุมฝ่ายที่เกี่ยวข้องกับผู้แทนจากเขต 1 หรือเขต 2?
|
Who were the comptrollers of the parties associated with the delegates from district 1 or district 2?
|
CREATE TABLE election (Committee VARCHAR, Party VARCHAR); CREATE TABLE party (Party_ID VARCHAR, Party VARCHAR)
|
SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Democratic"
|
คืนคณะกรรมการทั้งหมดที่มีผู้แทนจากพรรคประชาธิปัตย์
|
Return all the committees that have delegates from Democratic party.
|
CREATE TABLE election (District VARCHAR); CREATE TABLE county (County_name VARCHAR, County_id VARCHAR)
|
SELECT T1.County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id
|
แสดงชื่อของแต่ละเทศมณฑลพร้อมกับจำนวนผู้แทนจากเทศมณฑลนั้นๆ
|
Show the name of each county along with the corresponding number of delegates from that county.
|
CREATE TABLE election (Party VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR)
|
SELECT T2.Party, COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party
|
แสดงชื่อของแต่ละฝ่ายและจำนวนผู้ร่วมประชุมจากฝ่ายนั้น
|
Show the name of each party and the corresponding number of delegates from that party.
|
CREATE TABLE county (County_name VARCHAR, Population VARCHAR)
|
SELECT County_name FROM county ORDER BY Population
|
ส่งกลับชื่อของมณฑลทั้งหมดโดยเรียงตามจำนวนประชากรจากน้อยไปหามาก
|
Return the names of all counties sorted by population in ascending order.
|
CREATE TABLE county (County_name VARCHAR)
|
SELECT County_name FROM county ORDER BY County_name DESC
|
ส่งกลับชื่อของมณฑลทั้งหมดโดยเรียงตามชื่อเทศมณฑลตามลำดับตัวอักษรจากมากไปหาน้อย
|
Return the names of all counties sorted by county name in descending alphabetical order.
|
CREATE TABLE county (County_name VARCHAR, Population VARCHAR)
|
SELECT County_name FROM county ORDER BY Population DESC LIMIT 1
|
แสดงชื่อจังหวัดที่มีประชากรมากที่สุด
|
Show the name of the county with the biggest population.
|
CREATE TABLE county (County_name VARCHAR, Population VARCHAR)
|
SELECT County_name FROM county ORDER BY Population LIMIT 3
|
แสดง 3 มณฑลที่มีประชากรน้อยที่สุด
|
Show the 3 counties with the smallest population.
|
CREATE TABLE election (District VARCHAR); CREATE TABLE county (County_name VARCHAR, County_id VARCHAR)
|
SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id HAVING COUNT(*) >= 2
|
แสดงชื่อมณฑลที่มีผู้แทนอย่างน้อยสองคน
|
Show the names of counties that have at least two delegates.
|
CREATE TABLE party (Party VARCHAR)
|
SELECT Party FROM party GROUP BY Party HAVING COUNT(*) >= 2
|
แสดงชื่อของฝ่ายที่มีอย่างน้อยสองเรกคอร์ด
|
Show the name of the party that has at least two records.
|
CREATE TABLE election (Party VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR)
|
SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1
|
แสดงชื่อพรรคที่มีผู้ร่วมประชุมมากที่สุด
|
Show the name of the party that has the most delegates.
|
CREATE TABLE party (Governor VARCHAR)
|
SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1
|
แสดงให้คนที่ได้เป็นเจ้าเมืองบ่อยที่สุด
|
Show the people that have been governor the most times.
|
CREATE TABLE party (Comptroller VARCHAR)
|
SELECT Comptroller, COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1
|
แสดงผู้ที่ถูกควบคุมมากที่สุดและจำนวนครั้งที่สอดคล้องกัน
|
Show the people that have been comptroller the most times and the corresponding number of times.
|
CREATE TABLE election (Party VARCHAR, Party_ID VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR)
|
SELECT Party FROM party WHERE NOT Party_ID IN (SELECT Party FROM election)
|
พรรคที่ไม่มีผู้แทนในการเลือกตั้งมีชื่ออะไรบ้าง?
|
What are the names of parties that do not have delegates in election?
|
CREATE TABLE election (Party VARCHAR, Committee VARCHAR); CREATE TABLE party (Party VARCHAR, Party_ID VARCHAR)
|
SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = "Appropriations" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = "Economic Matters"
|
ชื่อพรรคที่มีผู้แทนทั้งคณะกรรมการ "จัดสรร" และ
|
What are the names of parties that have both delegates on "Appropriations" committee and
|
CREATE TABLE election (Committee VARCHAR, Party VARCHAR); CREATE TABLE party (Party_ID VARCHAR, Party VARCHAR)
|
SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Democratic" INTERSECT SELECT T1.Committee FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Liberal"
|
คณะกรรมการชุดไหนมีผู้แทนจากทั้งพรรคประชาธิปัตย์และพรรคเสรีนิยม?
|
Which committees have delegates from both democratic party and liberal party?
|
CREATE TABLE journalist (Id VARCHAR)
|
SELECT COUNT(*) FROM journalist
|
มีนักข่าวกี่คน?
|
How many journalists are there?
|
CREATE TABLE journalist (Name VARCHAR, Years_working VARCHAR)
|
SELECT Name FROM journalist ORDER BY Years_working
|
รายชื่อนักข่าวโดยเรียงตามอายุงานจากน้อยไปหามาก
|
List the names of journalists in ascending order of years working.
|
CREATE TABLE journalist (Nationality VARCHAR, Age VARCHAR)
|
SELECT Nationality, Age FROM journalist
|
นักข่าวมีสัญชาติและอายุเท่าไร?
|
What are the nationalities and ages of journalists?
|
CREATE TABLE journalist (Name VARCHAR, Nationality VARCHAR)
|
SELECT Name FROM journalist WHERE Nationality = "England" OR Nationality = "Wales"
|
แสดงชื่อนักข่าวจาก "อังกฤษ" หรือ "เวลส์"
|
Show the names of journalists from "England" or "Wales".
|
CREATE TABLE journalist (Years_working INTEGER)
|
SELECT AVG(Years_working) FROM journalist
|
การทำงานเป็นนักข่าวใช้เวลาโดยเฉลี่ยกี่ปี?
|
What is the average number of years spent working as a journalist?
|
CREATE TABLE journalist (Nationality VARCHAR, Years_working VARCHAR)
|
SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1
|
นักข่าวสัญชาติอะไรและมีจำนวนปีทำงานมากที่สุด?
|
What is the nationality of the journalist with the largest number of years working?
|
CREATE TABLE journalist (Nationality VARCHAR)
|
SELECT Nationality, COUNT(*) FROM journalist GROUP BY Nationality
|
แสดงเชื้อชาติและจำนวนนักข่าวแต่ละสัญชาติ
|
Show the different nationalities and the number of journalists of each nationality.
|
CREATE TABLE journalist (Nationality VARCHAR)
|
SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
|
แสดงสัญชาติที่พบบ่อยที่สุดสำหรับนักข่าว
|
Show the most common nationality for journalists.
|
CREATE TABLE journalist (Nationality VARCHAR, Years_working INTEGER)
|
SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3
|
แสดงประเทศที่มีทั้งนักข่าวที่ทำงานมากกว่า 10 ปี และนักข่าวที่ทำงานน้อยกว่า 3 ปี
|
Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.
|
CREATE TABLE event (Date VARCHAR, Name VARCHAR, venue VARCHAR, Event_Attendance VARCHAR)
|
SELECT Date, Name, venue FROM event ORDER BY Event_Attendance DESC
|
แสดงวันที่ สถานที่ และชื่อของเหตุการณ์โดยเรียงลำดับจากมากไปน้อยของการเข้าร่วม
|
Show the dates, places, and names of events in descending order of the attendance.
|
CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Event_ID VARCHAR, journalist_ID VARCHAR); CREATE TABLE event (Date VARCHAR, Event_ID VARCHAR)
|
SELECT T3.Name, T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID
|
แสดงชื่อนักข่าวและวันที่ของเหตุการณ์ที่พวกเขารายงาน
|
Show the names of journalists and the dates of the events they reported.
|
CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Event_ID VARCHAR, journalist_ID VARCHAR); CREATE TABLE event (Name VARCHAR, Event_ID VARCHAR, Event_Attendance VARCHAR)
|
SELECT T3.Name, T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID ORDER BY T2.Event_Attendance
|
แสดงชื่อนักข่าวและชื่อเหตุการณ์ที่พวกเขารายงานโดยเรียงลำดับจากน้อยไปหามาก
|
Show the names of journalists and the names of the events they reported in ascending order
|
CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Event_ID VARCHAR, journalist_ID VARCHAR); CREATE TABLE event (Event_ID VARCHAR)
|
SELECT T3.Name, COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name
|
แสดงชื่อนักข่าวและจำนวนเหตุการณ์ที่พวกเขารายงาน
|
Show the names of journalists and the number of events they reported.
|
CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Event_ID VARCHAR, journalist_ID VARCHAR); CREATE TABLE event (Event_ID VARCHAR)
|
SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1
|
แสดงรายชื่อนักข่าวที่รายงานเหตุการณ์มากกว่า 1 ครั้ง
|
Show the names of journalists that have reported more than one event.
|
CREATE TABLE journalist (Name VARCHAR, journalist_ID VARCHAR); CREATE TABLE news_report (Name VARCHAR, journalist_ID VARCHAR)
|
SELECT Name FROM journalist WHERE NOT journalist_ID IN (SELECT journalist_ID FROM news_report)
|
รายชื่อนักข่าวที่ยังไม่ได้รายงานเหตุการณ์ใดๆ
|
List the names of journalists who have not reported any event.
|
CREATE TABLE event (Event_Attendance INTEGER)
|
SELECT AVG(Event_Attendance), MAX(Event_Attendance) FROM event
|
ผู้เข้าร่วมงานทั้งหมดโดยเฉลี่ยและสูงสุดคือเท่าไร?
|
what are the average and maximum attendances of all events?
|
CREATE TABLE news_report (work_type VARCHAR, journalist_id VARCHAR); CREATE TABLE journalist (age INTEGER, journalist_id VARCHAR)
|
SELECT AVG(t1.age), AVG(Years_working), t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type
|
ค้นหาอายุเฉลี่ยและประสบการณ์ในการทำงานของนักข่าวที่ทำงานตามบทบาทประเภทต่างๆ
|
Find the average age and experience working length of journalists working on different role type.
|
CREATE TABLE event (venue VARCHAR, name VARCHAR, Event_Attendance VARCHAR)
|
SELECT venue, name FROM event ORDER BY Event_Attendance DESC LIMIT 2
|
ระบุสถานที่จัดงานและชื่อที่มีผู้เข้าร่วมมากที่สุด 2 อันดับแรก
|
List the event venues and names that have the top 2 most number of people attended.
|
CREATE TABLE Restaurant (ResName VARCHAR)
|
SELECT ResName FROM Restaurant
|
แสดงร้านอาหารทั้งหมดให้ฉันดู
|
Show me all the restaurants.
|
CREATE TABLE Restaurant (Address VARCHAR, ResName VARCHAR)
|
SELECT Address FROM Restaurant WHERE ResName = "Subway"
|
ที่อยู่ของร้านอาหาร Subway คืออะไร?
|
What is the address of the restaurant Subway?
|
CREATE TABLE Restaurant (Rating VARCHAR, ResName VARCHAR)
|
SELECT Rating FROM Restaurant WHERE ResName = "Subway"
|
เรตติ้งของร้านอาหาร Subway คือเท่าไร?
|
What is the rating of the restaurant Subway?
|
CREATE TABLE Restaurant_Type (ResTypeName VARCHAR)
|
SELECT ResTypeName FROM Restaurant_Type
|
รายชื่อร้านอาหารทุกประเภท
|
List all restaurant types.
|
CREATE TABLE Restaurant_Type (ResTypeDescription VARCHAR, ResTypeName VARCHAR)
|
SELECT ResTypeDescription FROM Restaurant_Type WHERE ResTypeName = "Sandwich"
|
ร้านอาหารประเภทแซนด์วิชมีคำอธิบายว่าอย่างไร?
|
What is the description of the restaurant type Sandwich?
|
CREATE TABLE Restaurant (ResName VARCHAR, Rating VARCHAR)
|
SELECT ResName, Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1
|
ร้านอาหารใดได้รับคะแนนสูงสุด? ระบุชื่อร้านอาหารและคะแนน
|
Which restaurants have highest rating? List the restaurant name and its rating.
|
CREATE TABLE Student (Age VARCHAR, Fname VARCHAR, Lname VARCHAR)
|
SELECT Age FROM Student WHERE Fname = "Linda" AND Lname = "Smith"
|
นักเรียนลินดา สมิธอายุเท่าไหร่?
|
What is the age of student Linda Smith?
|
CREATE TABLE Student (Sex VARCHAR, Fname VARCHAR, Lname VARCHAR)
|
SELECT Sex FROM Student WHERE Fname = "Linda" AND Lname = "Smith"
|
นักเรียนลินดา สมิธเป็นเพศอะไร
|
What is the gender of the student Linda Smith?
|
CREATE TABLE Student (Fname VARCHAR, Lname VARCHAR, Major VARCHAR)
|
SELECT Fname, Lname FROM Student WHERE Major = 600
|
รายชื่อและนามสกุลของนักศึกษาทุกคนที่เรียนวิชาเอก 600
|
List all students' first names and last names who majored in 600.
|
CREATE TABLE Student (city_code VARCHAR, Fname VARCHAR, Lname VARCHAR)
|
SELECT city_code FROM Student WHERE Fname = "Linda" AND Lname = "Smith"
|
นักเรียน Linda Smith อาศัยอยู่ในเมืองใด
|
Which city does student Linda Smith live in?
|
CREATE TABLE Student (Advisor VARCHAR)
|
SELECT COUNT(*) FROM Student WHERE Advisor = 1121
|
ที่ปรึกษา 1121 มีนักเรียนกี่คน?
|
Advisor 1121 has how many students?
|
CREATE TABLE Student (Advisor VARCHAR)
|
SELECT Advisor, COUNT(*) FROM Student GROUP BY Advisor ORDER BY COUNT(Advisor) DESC LIMIT 1
|
อาจารย์ที่ปรึกษาคนไหนมีนักเรียนมากที่สุด? รายชื่อที่ปรึกษาและจำนวนนักศึกษา
|
Which Advisor has most of students? List advisor and the number of students.
|
CREATE TABLE Student (Major VARCHAR)
|
SELECT Major, COUNT(*) FROM Student GROUP BY Major ORDER BY COUNT(Major) LIMIT 1
|
สาขาวิชาใดมีจำนวนนักศึกษาน้อยที่สุด? ระบุสาขาวิชาและจำนวนนักศึกษา
|
Which major has least number of students? List the major and the number of students.
|
CREATE TABLE Student (Major VARCHAR)
|
SELECT Major, COUNT(*) FROM Student GROUP BY Major HAVING COUNT(Major) BETWEEN 2 AND 30
|
สาขาวิชาเอกใดมีจำนวนนักศึกษาระหว่าง 2 ถึง 30 คน รายชื่อเอกและจำนวนนักศึกษา
|
Which major has between 2 and 30 number of students? List major and the number of students.
|
CREATE TABLE Student (Fname VARCHAR, Lname VARCHAR, Age VARCHAR, Major VARCHAR)
|
SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major = 600
|
นักเรียนคนไหนอายุเกิน 18 ปี และเรียนเอก 600 ปี? ระบุชื่อและนามสกุลของนักเรียนแต่ละคน
|
Which student's age is older than 18 and is majoring in 600? List each student's first and last name.
|
CREATE TABLE Student (Fname VARCHAR, Lname VARCHAR, Sex VARCHAR, Age VARCHAR, Major VARCHAR)
|
SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major <> 600 AND Sex = 'F'
|
รายชื่อนักเรียนหญิงทุกคนที่มีอายุมากกว่า 18 ปี และไม่ได้เรียนวิชาเอกในปี 600 ให้ระบุชื่อและนามสกุลของนักเรียน
|
List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.
|
CREATE TABLE Type_Of_Restaurant (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR); CREATE TABLE Restaurant_Type (Id VARCHAR)
|
SELECT COUNT(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID = Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich'
|
ร้านอาหารประเภทแซนวิชมีกี่ร้าน?
|
How many restaurant is the Sandwich type restaurant?
|
CREATE TABLE Visits_Restaurant (Spent INTEGER); CREATE TABLE Student (Spent INTEGER)
|
SELECT SUM(Spent) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID WHERE Student.Fname = "Linda" AND Student.Lname = "Smith"
|
นักเรียน Linda Smith ใช้เวลาอยู่ที่ร้านอาหารทั้งหมดนานเท่าใด
|
How long does student Linda Smith spend on the restaurant in total?
|
CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Student (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR)
|
SELECT COUNT(*) FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = "Linda" AND Student.Lname = "Smith" AND Restaurant.ResName = "Subway"
|
นักเรียน Linda Smith ไปที่ Subway กี่ครั้งแล้ว?
|
How many times has the student Linda Smith visited Subway?
|
CREATE TABLE Restaurant (TIME VARCHAR); CREATE TABLE Visits_Restaurant (TIME VARCHAR); CREATE TABLE Student (TIME VARCHAR)
|
SELECT TIME FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID WHERE Student.Fname = "Linda" AND Student.Lname = "Smith" AND Restaurant.ResName = "Subway"
|
Linda Smith ไปเยี่ยม Subway เมื่อไร?
|
When did Linda Smith visit Subway?
|
CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR)
|
SELECT Restaurant.ResName, SUM(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID ORDER BY SUM(Visits_Restaurant.Spent) LIMIT 1
|
นักเรียนใช้เวลาอยู่ที่ร้านอาหารใดน้อยที่สุด รายชื่อร้านอาหารและเวลาที่นักเรียนใช้ไปทั้งหมด
|
At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.
|
CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Student (Id VARCHAR)
|
SELECT Student.Fname, Student.Lname FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID GROUP BY Student.StuID ORDER BY COUNT(*) DESC LIMIT 1
|
นักเรียนคนไหนไปร้านอาหารบ่อยที่สุด? ระบุชื่อและนามสกุลของนักเรียน
|
Which student visited restaurant most often? List student's first name and last name.
|
CREATE TABLE actual_orders (actual_order_id VARCHAR, order_status_code VARCHAR)
|
SELECT actual_order_id FROM actual_orders WHERE order_status_code = 'Success'
|
ค้นหารหัสคำสั่งซื้อที่มีสถานะเป็น 'สำเร็จ'
|
Find the ids of orders whose status is 'Success'.
|
CREATE TABLE products (product_name VARCHAR, product_price VARCHAR, product_id VARCHAR); CREATE TABLE regular_order_products (product_id VARCHAR)
|
SELECT t1.product_name, t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY COUNT(*) DESC LIMIT 1
|
ค้นหาชื่อและราคาของผลิตภัณฑ์ที่มีการสั่งซื้อมากที่สุด
|
Find the name and price of the product that has been ordered the greatest number of times.
|
CREATE TABLE customers (Id VARCHAR)
|
SELECT COUNT(*) FROM customers
|
ค้นหาจำนวนลูกค้าทั้งหมด
|
Find the number of customers in total.
|
CREATE TABLE customers (payment_method VARCHAR)
|
SELECT COUNT(DISTINCT payment_method) FROM customers
|
มีวิธีการชำระเงินที่แตกต่างกันกี่วิธี?
|
How many different payment methods are there?
|
CREATE TABLE trucks (truck_details VARCHAR, truck_licence_number VARCHAR)
|
SELECT truck_details FROM trucks ORDER BY truck_licence_number
|
แสดงรายละเอียดของรถบรรทุกทั้งหมดตามลำดับหมายเลขใบอนุญาต
|
Show the details of all trucks in the order of their license number.
|
CREATE TABLE products (product_name VARCHAR, product_price VARCHAR)
|
SELECT product_name FROM products ORDER BY product_price DESC LIMIT 1
|
ค้นหาชื่อผลิตภัณฑ์ที่แพงที่สุด
|
Find the name of the most expensive product.
|
CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR); CREATE TABLE addresses (address_id VARCHAR, state_province_county VARCHAR)
|
SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'
|
ค้นหาชื่อลูกค้าที่ไม่ได้อาศัยอยู่ในรัฐแคลิฟอร์เนีย
|
Find the names of customers who are not living in the state of California.
|
CREATE TABLE customers (customer_email VARCHAR, customer_name VARCHAR, payment_method VARCHAR)
|
SELECT customer_email, customer_name FROM customers WHERE payment_method = 'Visa'
|
ระบุชื่อและอีเมลของลูกค้าที่ชำระเงินด้วยบัตรวีซ่า
|
List the names and emails of customers who payed by Visa card.
|
CREATE TABLE customer_addresses (customer_id VARCHAR, address_id VARCHAR); CREATE TABLE customers (customer_name VARCHAR, customer_phone VARCHAR, customer_id VARCHAR); CREATE TABLE addresses (address_id VARCHAR, state_province_county VARCHAR)
|
SELECT t1.customer_name, t1.customer_phone FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = 'California'
|
ค้นหาชื่อและหมายเลขโทรศัพท์ของลูกค้าที่อาศัยอยู่ในรัฐแคลิฟอร์เนีย
|
Find the names and phone numbers of customers living in California state.
|
CREATE TABLE Employees (state_province_county VARCHAR, address_id VARCHAR, employee_address_id VARCHAR); CREATE TABLE addresses (state_province_county VARCHAR, address_id VARCHAR, employee_address_id VARCHAR)
|
SELECT state_province_county FROM addresses WHERE NOT address_id IN (SELECT employee_address_id FROM Employees)
|
ค้นหารัฐที่ไม่มีพนักงานอยู่ในบันทึก
|
Find the states which do not have any employee in their record.
|
CREATE TABLE Customers (customer_name VARCHAR, customer_phone VARCHAR, customer_email VARCHAR, date_became_customer VARCHAR)
|
SELECT customer_name, customer_phone, customer_email FROM Customers ORDER BY date_became_customer
|
ระบุชื่อ หมายเลขโทรศัพท์ และอีเมลของลูกค้าทั้งหมด เรียงตามวันที่เป็นลูกค้า
|
List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers.
|
CREATE TABLE Customers (customer_name VARCHAR, date_became_customer VARCHAR)
|
SELECT customer_name FROM Customers ORDER BY date_became_customer LIMIT 5
|
ค้นหาชื่อลูกค้า 5 คนแรก
|
Find the name of the first 5 customers.
|
CREATE TABLE Customers (payment_method VARCHAR)
|
SELECT payment_method FROM Customers GROUP BY payment_method ORDER BY COUNT(*) DESC LIMIT 1
|
ค้นหาวิธีการชำระเงินที่ใช้บ่อยที่สุด
|
Find the payment method that is used most frequently.
|
CREATE TABLE Delivery_Routes (route_name VARCHAR)
|
SELECT route_name FROM Delivery_Routes ORDER BY route_name
|
รายชื่อเส้นทางทั้งหมดตามลำดับตัวอักษร
|
List the names of all routes in alphabetic order.
|
CREATE TABLE Delivery_Routes (route_name VARCHAR, route_id VARCHAR); CREATE TABLE Delivery_Route_Locations (route_id VARCHAR)
|
SELECT t1.route_name FROM Delivery_Routes AS t1 JOIN Delivery_Route_Locations AS t2 ON t1.route_id = t2.route_id GROUP BY t1.route_id ORDER BY COUNT(*) DESC LIMIT 1
|
ค้นหาชื่อเส้นทางที่มีจำนวนการส่งมอบสูงสุด
|
Find the name of route that has the highest number of deliveries.
|
CREATE TABLE customer_addresses (address_id VARCHAR); CREATE TABLE addresses (state_province_county VARCHAR, address_id VARCHAR)
|
SELECT t2.state_province_county, COUNT(*) FROM customer_addresses AS t1 JOIN addresses AS t2 ON t1.address_id = t2.address_id GROUP BY t2.state_province_county
|
ระบุชื่อรัฐและจำนวนลูกค้าที่อาศัยอยู่ในแต่ละรัฐ
|
List the state names and the number of customers living in each state.
|
CREATE TABLE authors (Id VARCHAR)
|
SELECT COUNT(*) FROM authors
|
มีผู้เขียนกี่คน?
|
How many authors are there?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.