context
stringlengths 27
489
| answer
stringlengths 18
557
| question_th
stringlengths 8
226
| question_en
stringlengths 12
244
|
---|---|---|---|
CREATE TABLE employee (name VARCHAR, age VARCHAR)
|
SELECT name FROM employee ORDER BY age
|
จัดเรียงชื่อพนักงานตามอายุโดยเรียงลำดับจากน้อยไปมาก
|
Sort employee names by their age in ascending order.
|
CREATE TABLE employee (city VARCHAR)
|
SELECT COUNT(*), city FROM employee GROUP BY city
|
จำนวนพนักงานจากแต่ละเมืองคือเท่าไร?
|
What is the number of employees from each city?
|
CREATE TABLE employee (city VARCHAR, age INTEGER)
|
SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING COUNT(*) > 1
|
พนักงานอายุต่ำกว่า 30 ปีมากกว่าหนึ่งคนมาจากเมืองใดบ้าง
|
Which cities do more than one employee under age 30 come from?
|
CREATE TABLE shop (LOCATION VARCHAR)
|
SELECT COUNT(*), LOCATION FROM shop GROUP BY LOCATION
|
ค้นหาจำนวนร้านค้าในแต่ละสถานที่
|
Find the number of shops in each location.
|
CREATE TABLE shop (manager_name VARCHAR, district VARCHAR, number_products VARCHAR)
|
SELECT manager_name, district FROM shop ORDER BY number_products DESC LIMIT 1
|
ค้นหาชื่อผู้จัดการและเขตของร้านค้าที่มีจำนวนสินค้ามากที่สุด
|
Find the manager name and district of the shop whose number of products is the largest.
|
CREATE TABLE shop (Number_products INTEGER)
|
SELECT MIN(Number_products), MAX(Number_products) FROM shop
|
ค้นหาจำนวนสินค้าขั้นต่ำและสูงสุดของร้านค้าทั้งหมด
|
find the minimum and maximum number of products of all stores.
|
CREATE TABLE shop (name VARCHAR, LOCATION VARCHAR, district VARCHAR, number_products VARCHAR)
|
SELECT name, LOCATION, district FROM shop ORDER BY number_products DESC
|
กลับชื่อ ที่ตั้ง และอำเภอของร้านค้าทั้งหมดโดยเรียงตามจำนวนสินค้าจากมากไปน้อย
|
Return the name, location and district of all shops in descending order of number of products.
|
CREATE TABLE shop (name VARCHAR, number_products INTEGER)
|
SELECT name FROM shop WHERE number_products > (SELECT AVG(number_products) FROM shop)
|
ค้นหาชื่อร้านค้าที่มีจำนวนสินค้ามากกว่าจำนวนสินค้าโดยเฉลี่ย
|
Find the names of stores whose number products is more than the average number of products.
|
CREATE TABLE evaluation (Employee_ID VARCHAR); CREATE TABLE employee (name VARCHAR, Employee_ID VARCHAR)
|
SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID GROUP BY t2.Employee_ID ORDER BY COUNT(*) DESC LIMIT 1
|
ค้นหาชื่อพนักงานที่ได้รับรางวัลมากที่สุดในการประเมิน
|
find the name of employee who was awarded the most times in the evaluation.
|
CREATE TABLE evaluation (Employee_ID VARCHAR, bonus VARCHAR); CREATE TABLE employee (name VARCHAR, Employee_ID VARCHAR)
|
SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1
|
ค้นหาชื่อพนักงานที่ได้รับโบนัสครั้งเดียวสูงสุด
|
Find the name of the employee who got the highest one time bonus.
|
CREATE TABLE evaluation (name VARCHAR, Employee_ID VARCHAR); CREATE TABLE employee (name VARCHAR, Employee_ID VARCHAR)
|
SELECT name FROM employee WHERE NOT Employee_ID IN (SELECT Employee_ID FROM evaluation)
|
ค้นหารายชื่อพนักงานที่ไม่เคยได้รับรางวัลใดๆ ในการประเมิน
|
Find the names of employees who never won any award in the evaluation.
|
CREATE TABLE shop (name VARCHAR, shop_id VARCHAR); CREATE TABLE hiring (shop_id VARCHAR)
|
SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY COUNT(*) DESC LIMIT 1
|
ร้านที่รับสมัครพนักงานมากที่สุดชื่อว่าอะไรคะ?
|
What is the name of the shop that is hiring the largest number of employees?
|
CREATE TABLE shop (name VARCHAR, shop_id VARCHAR); CREATE TABLE hiring (name VARCHAR, shop_id VARCHAR)
|
SELECT name FROM shop WHERE NOT shop_id IN (SELECT shop_id FROM hiring)
|
ค้นหาชื่อร้านค้าที่ไม่จ้างพนักงานคนใด
|
Find the name of the shops that do not hire any employee.
|
CREATE TABLE shop (name VARCHAR, shop_id VARCHAR); CREATE TABLE hiring (shop_id VARCHAR)
|
SELECT COUNT(*), t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name
|
ค้นหาจำนวนพนักงานที่ได้รับการว่าจ้างในแต่ละร้าน แสดงชื่อร้านด้วย
|
Find the number of employees hired in each shop; show the shop name as well.
|
CREATE TABLE evaluation (bonus INTEGER)
|
SELECT SUM(bonus) FROM evaluation
|
โบนัสทั้งหมดที่มอบให้ในการประเมินทั้งหมดคือเท่าไร?
|
What is total bonus given in all evaluations?
|
CREATE TABLE hiring (Id VARCHAR)
|
SELECT * FROM hiring
|
ให้ข้อมูลทั้งหมดเกี่ยวกับการจ้างงานแก่ฉัน
|
Give me all the information about hiring.
|
CREATE TABLE shop (district VARCHAR, Number_products INTEGER)
|
SELECT district FROM shop WHERE Number_products < 3000 INTERSECT SELECT district FROM shop WHERE Number_products > 10000
|
เขตใดมีทั้งร้านค้าที่มีสินค้าน้อยกว่า 3,000 รายการและร้านค้าที่มีสินค้ามากกว่า 10,000 รายการ
|
Which district has both stores with less than 3000 products and stores with more than 10000 products?
|
CREATE TABLE shop (LOCATION VARCHAR)
|
SELECT COUNT(DISTINCT LOCATION) FROM shop
|
มีร้านค้าที่แตกต่างกันกี่แห่ง?
|
How many different store locations are there?
|
CREATE TABLE Documents (document_id VARCHAR, document_name VARCHAR, document_description VARCHAR)
|
SELECT document_id, document_name, document_description FROM Documents
|
แสดงรายการ ID เอกสาร ชื่อเอกสาร และคำอธิบายเอกสารสำหรับเอกสารทั้งหมด
|
List document IDs, document names, and document descriptions for all documents.
|
CREATE TABLE Documents (document_name VARCHAR, template_id VARCHAR, Document_Description VARCHAR)
|
SELECT document_name, template_id FROM Documents WHERE Document_Description LIKE "%w%"
|
ชื่อเอกสารและรหัสเทมเพลตสำหรับเอกสารที่มีคำอธิบายมีตัวอักษร 'w' อยู่ในนั้นคืออะไร
|
What is the document name and template id for document with description with the letter 'w' in it?
|
CREATE TABLE Documents (document_id VARCHAR, template_id VARCHAR, Document_Description VARCHAR, document_name VARCHAR)
|
SELECT document_id, template_id, Document_Description FROM Documents WHERE document_name = "Robbin CV"
|
รหัสเอกสาร รหัสเทมเพลต และคำอธิบายสำหรับเอกสารชื่อ "Robbin CV" คืออะไร
|
What is the document id, template id and description for document named "Robbin CV"?
|
CREATE TABLE Documents (template_id VARCHAR)
|
SELECT COUNT(DISTINCT template_id) FROM Documents
|
เอกสารทั้งหมดใช้เทมเพลตที่แตกต่างกันกี่แบบ
|
How many different templates do all document use?
|
CREATE TABLE Templates (Template_ID VARCHAR, Template_Type_Code VARCHAR); CREATE TABLE Documents (Template_ID VARCHAR)
|
SELECT COUNT(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'
|
มีเอกสารกี่ฉบับที่ใช้เทมเพลตที่มีรหัสประเภท 'PPT'
|
How many documents are using the template with type code 'PPT'?
|
CREATE TABLE Documents (template_id VARCHAR)
|
SELECT template_id, COUNT(*) FROM Documents GROUP BY template_id
|
แสดงรหัสเทมเพลตทั้งหมดและจำนวนเอกสารโดยใช้แต่ละเทมเพลต
|
Show all template ids and number of documents using each template.
|
CREATE TABLE Documents (template_id VARCHAR); CREATE TABLE Templates (Template_Type_Code VARCHAR, template_id VARCHAR)
|
SELECT T1.template_id, T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY COUNT(*) DESC LIMIT 1
|
รหัส id และรหัสประเภทสำหรับเทมเพลตที่ใช้โดยเอกสารส่วนใหญ่คืออะไร?
|
What is the id and type code for the template used by the most documents?
|
CREATE TABLE Documents (template_id VARCHAR)
|
SELECT template_id FROM Documents GROUP BY template_id HAVING COUNT(*) > 1
|
แสดงรหัสสำหรับเทมเพลตทั้งหมดที่ใช้โดยเอกสารมากกว่าหนึ่งฉบับ
|
Show ids for all templates that are used by more than one document.
|
CREATE TABLE Documents (template_id VARCHAR); CREATE TABLE Templates (template_id VARCHAR)
|
SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents
|
แสดงรหัสสำหรับเทมเพลตทั้งหมดที่เอกสารใดไม่ได้ใช้
|
Show ids for all templates not used by any document.
|
CREATE TABLE Templates (Id VARCHAR)
|
SELECT COUNT(*) FROM Templates
|
เรามีเทมเพลตกี่แบบ?
|
How many templates do we have?
|
CREATE TABLE Templates (template_id VARCHAR, version_number VARCHAR, template_type_code VARCHAR)
|
SELECT template_id, version_number, template_type_code FROM Templates
|
แสดงรหัสเทมเพลต หมายเลขเวอร์ชัน และรหัสประเภทเทมเพลตสำหรับเทมเพลตทั้งหมด
|
Show template ids, version numbers, and template type codes for all templates.
|
CREATE TABLE Templates (template_type_code VARCHAR)
|
SELECT DISTINCT template_type_code FROM Templates
|
แสดงรหัสประเภทเทมเพลตที่แตกต่างกันทั้งหมดสำหรับเทมเพลตทั้งหมด
|
Show all distinct template type codes for all templates.
|
CREATE TABLE Templates (template_id VARCHAR, template_type_code VARCHAR)
|
SELECT template_id FROM Templates WHERE template_type_code = "PP" OR template_type_code = "PPT"
|
รหัสของเทมเพลตที่มีรหัสประเภทเทมเพลต PP หรือ PPT คืออะไร
|
What are the ids of templates with template type code PP or PPT?
|
CREATE TABLE Templates (template_type_code VARCHAR)
|
SELECT COUNT(*) FROM Templates WHERE template_type_code = "CV"
|
มีเทมเพลตกี่แบบที่มีรหัสประเภทเทมเพลต CV
|
How many templates have template type code CV?
|
CREATE TABLE Templates (version_number INTEGER, template_type_code VARCHAR)
|
SELECT version_number, template_type_code FROM Templates WHERE version_number > 5
|
หมายเลขเวอร์ชันและรหัสประเภทเทมเพลตสำหรับเทมเพลตที่มีหมายเลขเวอร์ชันใหม่กว่า 5 คืออะไร
|
What is the version number and template type code for the template with version number later than 5?
|
CREATE TABLE Templates (template_type_code VARCHAR)
|
SELECT template_type_code, COUNT(*) FROM Templates GROUP BY template_type_code
|
แสดงรหัสประเภทเทมเพลตทั้งหมดและจำนวนเทมเพลตสำหรับแต่ละรายการ
|
Show all template type codes and number of templates for each.
|
CREATE TABLE Templates (template_type_code VARCHAR)
|
SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY COUNT(*) DESC LIMIT 1
|
โค้ดประเภทเทมเพลตใดมีจำนวนเทมเพลตมากที่สุด
|
Which template type code has most number of templates?
|
CREATE TABLE Templates (template_type_code VARCHAR)
|
SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING COUNT(*) < 3
|
แสดงรหัสประเภทเทมเพลตทั้งหมดที่มีเทมเพลตน้อยกว่าสามเทมเพลต
|
Show all template type codes with less than three templates.
|
CREATE TABLE Templates (template_type_code VARCHAR, Version_Number INTEGER)
|
SELECT MIN(Version_Number), template_type_code FROM Templates
|
หมายเลขเวอร์ชันที่เล็กที่สุดและรหัสประเภทเทมเพลตคืออะไร?
|
What the smallest version number and its template type code?
|
CREATE TABLE Templates (template_type_code VARCHAR, template_id VARCHAR); CREATE TABLE Documents (template_id VARCHAR, document_name VARCHAR)
|
SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = "Data base"
|
รหัสประเภทเทมเพลตของเทมเพลตที่ใช้โดยเอกสารชื่อ "ฐานข้อมูล" คืออะไร
|
What is the template type code of the template used by document with the name "Data base"?
|
CREATE TABLE Documents (document_name VARCHAR, template_id VARCHAR); CREATE TABLE Templates (template_id VARCHAR, template_type_code VARCHAR)
|
SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = "BK"
|
แสดงชื่อเอกสารทั้งหมดโดยใช้เทมเพลตพร้อมรหัสประเภทเทมเพลต BK
|
Show all document names using templates with template type code BK.
|
CREATE TABLE Documents (template_id VARCHAR); CREATE TABLE Templates (template_type_code VARCHAR, template_id VARCHAR)
|
SELECT T1.template_type_code, COUNT(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code
|
แสดงรหัสประเภทเทมเพลตทั้งหมดและจำนวนเอกสารที่ใช้แต่ละประเภท
|
Show all template type codes and the number of documents using each type.
|
CREATE TABLE Documents (template_id VARCHAR); CREATE TABLE Templates (template_type_code VARCHAR, template_id VARCHAR)
|
SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY COUNT(*) DESC LIMIT 1
|
เอกสารส่วนใหญ่ใช้รหัสประเภทเทมเพลตใด
|
Which template type code is used by most number of documents?
|
CREATE TABLE Documents (template_id VARCHAR); CREATE TABLE Templates (template_id VARCHAR); CREATE TABLE Templates (template_type_code VARCHAR)
|
SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id
|
แสดงรหัสประเภทเทมเพลตทั้งหมดที่เอกสารใดไม่ได้ใช้
|
Show all template type codes that are not used by any document.
|
CREATE TABLE Ref_template_types (template_type_code VARCHAR, template_type_description VARCHAR)
|
SELECT template_type_code, template_type_description FROM Ref_template_types
|
แสดงรหัสและคำอธิบายประเภทเทมเพลตทั้งหมด
|
Show all template type codes and descriptions.
|
CREATE TABLE Ref_template_types (template_type_description VARCHAR, template_type_code VARCHAR)
|
SELECT template_type_description FROM Ref_template_types WHERE template_type_code = "AD"
|
คำอธิบายประเภทเทมเพลตสำหรับรหัสประเภทเทมเพลต "AD" คืออะไร
|
What is the template type descriptions for template type code "AD".
|
CREATE TABLE Ref_template_types (template_type_code VARCHAR, template_type_description VARCHAR)
|
SELECT template_type_code FROM Ref_template_types WHERE template_type_description = "Book"
|
รหัสประเภทเทมเพลตสำหรับคำอธิบายประเภทเทมเพลต "หนังสือ" คืออะไร
|
What is the template type code for template type description "Book".
|
CREATE TABLE Templates (template_type_code VARCHAR, Template_ID VARCHAR); CREATE TABLE Documents (template_ID VARCHAR); CREATE TABLE Ref_template_types (template_type_description VARCHAR, template_type_code VARCHAR)
|
SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID
|
คำอธิบายประเภทเทมเพลตที่ชัดเจนสำหรับเทมเพลตที่เคยใช้ในเอกสารใด ๆ คืออะไร
|
What are the distinct template type descriptions for the templates ever used by any document?
|
CREATE TABLE Templates (template_id VARCHAR, template_type_code VARCHAR); CREATE TABLE Ref_template_types (template_type_code VARCHAR, template_type_description VARCHAR)
|
SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = "Presentation"
|
รหัสเทมเพลตที่มีคำอธิบายประเภทเทมเพลต "การนำเสนอ" คืออะไร
|
What are the template ids with template type description "Presentation".
|
CREATE TABLE Paragraphs (Id VARCHAR)
|
SELECT COUNT(*) FROM Paragraphs
|
มีทั้งหมดกี่ย่อหน้า?
|
How many paragraphs in total?
|
CREATE TABLE Documents (document_ID VARCHAR, document_name VARCHAR); CREATE TABLE Paragraphs (document_ID VARCHAR)
|
SELECT COUNT(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show'
|
เอกสารชื่อ 'Summer Show' มีกี่ย่อหน้า?
|
How many paragraphs for the document with name 'Summer Show'?
|
CREATE TABLE paragraphs (other_details VARCHAR, paragraph_text VARCHAR)
|
SELECT other_details FROM paragraphs WHERE paragraph_text LIKE 'korea'
|
แสดงรายละเอียดย่อหน้าสำหรับย่อหน้าที่มีข้อความ 'Korea '
|
Show paragraph details for paragraph with text 'Korea ' .
|
CREATE TABLE Documents (document_id VARCHAR, Document_Name VARCHAR); CREATE TABLE Paragraphs (paragraph_id VARCHAR, paragraph_text VARCHAR, document_id VARCHAR)
|
SELECT T1.paragraph_id, T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY'
|
แสดงรหัสย่อหน้าและข้อความทั้งหมดสำหรับเอกสารชื่อ "ยินดีต้อนรับสู่นิวยอร์ก"
|
Show all paragraph ids and texts for the document with name 'Welcome to NY'.
|
CREATE TABLE Paragraphs (paragraph_text VARCHAR, document_id VARCHAR); CREATE TABLE Documents (document_id VARCHAR, document_name VARCHAR)
|
SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = "Customer reviews"
|
แสดงข้อความย่อหน้าทั้งหมดสำหรับเอกสาร "บทวิจารณ์ของลูกค้า"
|
Show all paragraph texts for the document "Customer reviews".
|
CREATE TABLE Paragraphs (document_id VARCHAR)
|
SELECT document_id, COUNT(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id
|
แสดงรหัสเอกสารทั้งหมดและจำนวนย่อหน้าในแต่ละเอกสาร สั่งซื้อตามรหัสเอกสาร
|
Show all document ids and the number of paragraphs in each document. Order by document id.
|
CREATE TABLE Documents (document_name VARCHAR, document_id VARCHAR); CREATE TABLE Paragraphs (document_id VARCHAR)
|
SELECT T1.document_id, T2.document_name, COUNT(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id
|
แสดงรหัสเอกสาร ชื่อ และจำนวนย่อหน้าทั้งหมดในแต่ละเอกสาร
|
Show all document ids, names and the number of paragraphs in each document.
|
CREATE TABLE Paragraphs (document_id VARCHAR)
|
SELECT document_id FROM Paragraphs GROUP BY document_id HAVING COUNT(*) >= 2
|
แสดงรายการรหัสเอกสารทั้งหมดที่มีอย่างน้อยสองย่อหน้า
|
List all document ids with at least two paragraphs.
|
CREATE TABLE Documents (document_name VARCHAR, document_id VARCHAR); CREATE TABLE Paragraphs (document_id VARCHAR)
|
SELECT T1.document_id, T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY COUNT(*) DESC LIMIT 1
|
รหัสเอกสารและชื่อที่มีจำนวนย่อหน้ามากที่สุดคืออะไร?
|
What is the document id and name with greatest number of paragraphs?
|
CREATE TABLE Paragraphs (document_id VARCHAR)
|
SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY COUNT(*) LIMIT 1
|
รหัสเอกสารที่มีจำนวนย่อหน้าน้อยที่สุดคืออะไร?
|
What is the document id with least number of paragraphs?
|
CREATE TABLE Paragraphs (document_id VARCHAR)
|
SELECT document_id FROM Paragraphs GROUP BY document_id HAVING COUNT(*) BETWEEN 1 AND 2
|
รหัสเอกสารที่มี 1 ถึง 2 ย่อหน้าคืออะไร?
|
What is the document id with 1 to 2 paragraphs?
|
CREATE TABLE Paragraphs (document_id VARCHAR, paragraph_text VARCHAR)
|
SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland'
|
แสดงรหัสเอกสารพร้อมข้อความย่อหน้า 'บราซิล' และ 'ไอร์แลนด์'
|
Show the document id with paragraph text 'Brazil' and 'Ireland'.
|
CREATE TABLE teacher (Id VARCHAR)
|
SELECT COUNT(*) FROM teacher
|
มีครูกี่คน?
|
How many teachers are there?
|
CREATE TABLE teacher (Name VARCHAR, Age VARCHAR)
|
SELECT Name FROM teacher ORDER BY Age
|
รายชื่อครูตามลำดับอายุจากน้อยไปมาก
|
List the names of teachers in ascending order of age.
|
CREATE TABLE teacher (Age VARCHAR, Hometown VARCHAR)
|
SELECT Age, Hometown FROM teacher
|
อายุและบ้านเกิดของครูคือเท่าไร?
|
What are the age and hometown of teachers?
|
CREATE TABLE teacher (name VARCHAR, hometown VARCHAR)
|
SELECT name FROM teacher WHERE hometown <> "little lever urban district"
|
รายชื่อครูที่บ้านเกิดไม่ใช่ `` เขตเมืองลีเวอร์น้อย ''
|
List the name of teachers whose hometown is not `` Little Lever Urban District '' .
|
CREATE TABLE teacher (Name VARCHAR, Age VARCHAR)
|
SELECT Name FROM teacher WHERE Age = 32 OR Age = 33
|
แสดงชื่อครูอายุ 32 หรือ 33 ปี?
|
Show the name of teachers aged either 32 or 33?
|
CREATE TABLE teacher (Hometown VARCHAR, Age VARCHAR)
|
SELECT Hometown FROM teacher ORDER BY Age LIMIT 1
|
บ้านเกิดของครูที่อายุน้อยที่สุดคืออะไร?
|
What is the hometown of the youngest teacher?
|
CREATE TABLE teacher (Hometown VARCHAR)
|
SELECT Hometown, COUNT(*) FROM teacher GROUP BY Hometown
|
แสดงบ้านเกิดของครูที่แตกต่างกัน และจำนวนครูจากแต่ละบ้านเกิด
|
Show different hometown of teachers and the number of teachers from each hometown.
|
CREATE TABLE teacher (Hometown VARCHAR)
|
SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1
|
รายชื่อบ้านเกิดของครูที่พบมากที่สุด
|
List the most common hometown of teachers.
|
CREATE TABLE teacher (Hometown VARCHAR)
|
SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2
|
แสดงบ้านเกิดที่ครูอย่างน้อยสองคนมีร่วมกัน
|
Show the hometowns shared by at least two teachers.
|
CREATE TABLE course_arrange (Course_ID VARCHAR, Teacher_ID VARCHAR); CREATE TABLE teacher (Name VARCHAR, Teacher_ID VARCHAR); CREATE TABLE course (Course VARCHAR, Course_ID VARCHAR)
|
SELECT T3.Name, T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID
|
แสดงชื่อครูและหลักสูตรที่จัดสอน
|
Show names of teachers and the courses they are arranged to teach.
|
CREATE TABLE course_arrange (Course_ID VARCHAR, Teacher_ID VARCHAR); CREATE TABLE teacher (Name VARCHAR, Teacher_ID VARCHAR); CREATE TABLE course (Course VARCHAR, Course_ID VARCHAR)
|
SELECT T3.Name, T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID ORDER BY T3.Name
|
แสดงชื่อครูและรายวิชาที่จัดสอนโดยเรียงตามตัวอักษรของชื่อครู
|
Show names of teachers and the courses they are arranged to teach in ascending alphabetical order of the teacher's name.
|
CREATE TABLE course_arrange (Course_ID VARCHAR, Teacher_ID VARCHAR); CREATE TABLE course (Course_ID VARCHAR, Course VARCHAR); CREATE TABLE teacher (Name VARCHAR, Teacher_ID VARCHAR)
|
SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math"
|
แสดงชื่อครูประจำวิชาคณิตศาสตร์
|
Show the name of the teacher for the math course.
|
CREATE TABLE teacher (Name VARCHAR, Teacher_ID VARCHAR); CREATE TABLE course_arrange (Teacher_ID VARCHAR)
|
SELECT T2.Name, COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name
|
แสดงชื่อครูและจำนวนรายวิชาที่สอน
|
Show names of teachers and the number of courses they teach.
|
CREATE TABLE teacher (Name VARCHAR, Teacher_ID VARCHAR); CREATE TABLE course_arrange (Teacher_ID VARCHAR)
|
SELECT T2.Name FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name HAVING COUNT(*) >= 2
|
แสดงชื่อครูที่สอนอย่างน้อยสองรายวิชา
|
Show names of teachers that teach at least two courses.
|
CREATE TABLE course_arrange (Name VARCHAR, Teacher_id VARCHAR); CREATE TABLE teacher (Name VARCHAR, Teacher_id VARCHAR)
|
SELECT Name FROM teacher WHERE NOT Teacher_id IN (SELECT Teacher_id FROM course_arrange)
|
รายชื่อครูที่ยังไม่ได้จัดการเรียนการสอนรายวิชา
|
List the names of teachers who have not been arranged to teach courses.
|
CREATE TABLE visitor (age INTEGER)
|
SELECT COUNT(*) FROM visitor WHERE age < 30
|
มีผู้เข้าชมที่มีอายุต่ำกว่า 30 ปีกี่คน?
|
How many visitors below age 30 are there?
|
CREATE TABLE visitor (name VARCHAR, Level_of_membership INTEGER)
|
SELECT name FROM visitor WHERE Level_of_membership > 4 ORDER BY Level_of_membership DESC
|
ค้นหาชื่อผู้เข้าชมที่มีระดับสมาชิกสูงกว่า 4 และเรียงลำดับผลลัพธ์ตามระดับจากสูงไปต่ำ
|
Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low.
|
CREATE TABLE visitor (age INTEGER, Level_of_membership VARCHAR)
|
SELECT AVG(age) FROM visitor WHERE Level_of_membership <= 4
|
อายุเฉลี่ยของผู้เข้าชมที่มีระดับสมาชิกไม่สูงกว่า 4 คือเท่าไร?
|
What is the average age of the visitors whose membership level is not higher than 4?
|
CREATE TABLE visitor (name VARCHAR, Level_of_membership INTEGER, age VARCHAR)
|
SELECT name, Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC
|
ค้นหาชื่อและระดับสมาชิกของผู้เข้าชมที่มีระดับสมาชิกสูงกว่า 4 และจัดเรียงตามอายุตั้งแต่อายุมากจนถึงอายุน้อย
|
Find the name and membership level of the visitors whose membership level is higher than 4, and sort by their age from old to young.
|
CREATE TABLE museum (museum_id VARCHAR, name VARCHAR, num_of_staff VARCHAR)
|
SELECT museum_id, name FROM museum ORDER BY num_of_staff DESC LIMIT 1
|
ค้นหารหัสและชื่อพิพิธภัณฑ์ที่มีเจ้าหน้าที่มากที่สุด?
|
Find the id and name of the museum that has the most staff members?
|
CREATE TABLE museum (num_of_staff INTEGER, open_year INTEGER)
|
SELECT AVG(num_of_staff) FROM museum WHERE open_year < 2009
|
ค้นหาจำนวนพนักงานโดยเฉลี่ยที่ทำงานให้กับพิพิธภัณฑ์ที่เปิดก่อนปี 2009
|
Find the average number of staff working for the museums that were open before 2009.
|
CREATE TABLE museum (Num_of_Staff VARCHAR, Open_Year VARCHAR, name VARCHAR)
|
SELECT Num_of_Staff, Open_Year FROM museum WHERE name = 'Plaza Museum'
|
พิพิธภัณฑ์พลาซ่ามิวเซียมเปิดทำการและหมายเลขเจ้าหน้าที่คือเมื่อใด
|
What are the opening year and staff number of the museum named Plaza Museum?
|
CREATE TABLE museum (name VARCHAR, num_of_staff INTEGER, open_year INTEGER)
|
SELECT name FROM museum WHERE num_of_staff > (SELECT MIN(num_of_staff) FROM museum WHERE open_year > 2010)
|
ค้นหาชื่อพิพิธภัณฑ์ที่มีเจ้าหน้าที่มากกว่าจำนวนพนักงานขั้นต่ำของพิพิธภัณฑ์ทุกแห่งที่เปิดหลังปี 2553
|
find the names of museums which have more staff than the minimum staff number of all museums opened after 2010.
|
CREATE TABLE visit (visitor_id VARCHAR); CREATE TABLE visitor (id VARCHAR, name VARCHAR, age VARCHAR)
|
SELECT t1.id, t1.name, t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t1.id HAVING COUNT(*) > 1
|
ค้นหารหัส ชื่อ และอายุของผู้เยี่ยมชมที่เคยเยี่ยมชมพิพิธภัณฑ์บางแห่งมากกว่าหนึ่งครั้ง
|
find the id, name and age for visitors who visited some museums more than once.
|
CREATE TABLE visit (visitor_id VARCHAR, Total_spent INTEGER); CREATE TABLE visitor (name VARCHAR, Level_of_membership VARCHAR, id VARCHAR)
|
SELECT t2.visitor_id, t1.name, t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY SUM(t2.Total_spent) DESC LIMIT 1
|
รหัส ชื่อ และระดับสมาชิกของผู้เข้าชมที่ใช้เงินรวมมากที่สุดในตั๋วพิพิธภัณฑ์ทั้งหมดคือเท่าใด
|
What are the id, name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?
|
CREATE TABLE museum (name VARCHAR, Museum_ID VARCHAR); CREATE TABLE visit (Museum_ID VARCHAR)
|
SELECT t2.Museum_ID, t1.name FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID GROUP BY t2.Museum_ID ORDER BY COUNT(*) DESC LIMIT 1
|
รหัสและชื่อของพิพิธภัณฑ์ที่เข้าชมบ่อยที่สุดคืออะไร?
|
What are the id and name of the museum visited most times?
|
CREATE TABLE visit (name VARCHAR, Museum_ID VARCHAR, museum_id VARCHAR); CREATE TABLE museum (name VARCHAR, Museum_ID VARCHAR, museum_id VARCHAR)
|
SELECT name FROM museum WHERE NOT Museum_ID IN (SELECT museum_id FROM visit)
|
พิพิธภัณฑ์ที่ยังไม่มีผู้เยี่ยมชมชื่ออะไร?
|
What is the name of the museum that had no visitor yet?
|
CREATE TABLE visitor (name VARCHAR, age VARCHAR, id VARCHAR); CREATE TABLE visit (visitor_id VARCHAR, num_of_ticket VARCHAR)
|
SELECT t1.name, t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id ORDER BY t2.num_of_ticket DESC LIMIT 1
|
ค้นหาชื่อและอายุของผู้เข้าชมที่ซื้อตั๋วมากที่สุดในคราวเดียว
|
Find the name and age of the visitor who bought the most tickets at once.
|
CREATE TABLE visit (num_of_ticket INTEGER)
|
SELECT AVG(num_of_ticket), MAX(num_of_ticket) FROM visit
|
จำนวนตั๋วโดยเฉลี่ยและสูงสุดที่ซื้อในการเข้าชมทั้งหมดคือเท่าใด
|
What are the average and maximum number of tickets bought in all visits?
|
CREATE TABLE visit (Total_spent INTEGER, visitor_id VARCHAR); CREATE TABLE visitor (id VARCHAR, Level_of_membership VARCHAR)
|
SELECT SUM(t2.Total_spent) FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id WHERE t1.Level_of_membership = 1
|
ค่าตั๋วทั้งหมดของผู้เยี่ยมชมที่มีระดับสมาชิกเป็น 1 คือเท่าไร?
|
What is the total ticket expense of the visitors whose membership level is 1?
|
CREATE TABLE visitor (name VARCHAR, id VARCHAR); CREATE TABLE museum (Museum_ID VARCHAR, open_year INTEGER); CREATE TABLE visit (visitor_id VARCHAR, Museum_ID VARCHAR)
|
SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year < 2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year > 2011
|
ผู้เข้าชมที่เยี่ยมชมทั้งพิพิธภัณฑ์ที่เปิดก่อนปี 2009 และพิพิธภัณฑ์ที่เปิดหลังปี 2011 ชื่ออะไร
|
What is the name of the visitor who visited both a museum opened before 2009 and a museum opened after 2011?
|
CREATE TABLE museum (Museum_ID VARCHAR, open_year INTEGER); CREATE TABLE visitor (id VARCHAR); CREATE TABLE visit (visitor_id VARCHAR, Museum_ID VARCHAR)
|
SELECT COUNT(*) FROM visitor WHERE NOT id IN (SELECT t2.visitor_id FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID WHERE t1.open_year > 2010)
|
ค้นหาจำนวนผู้เข้าชมที่ไม่ได้เยี่ยมชมพิพิธภัณฑ์ใดๆ ที่เปิดหลังปี 2010
|
Find the number of visitors who did not visit any museum opened after 2010.
|
CREATE TABLE museum (open_year VARCHAR)
|
SELECT COUNT(*) FROM museum WHERE open_year > 2013 OR open_year < 2008
|
มีพิพิธภัณฑ์กี่แห่งที่เปิดหลังปี 2556 หรือก่อนปี 2551
|
How many museums were opened after 2013 or before 2008?
|
CREATE TABLE players (Id VARCHAR)
|
SELECT COUNT(*) FROM players
|
ค้นหาจำนวนผู้เล่นทั้งหมด
|
Find the total number of players.
|
CREATE TABLE matches (Id VARCHAR)
|
SELECT COUNT(*) FROM matches
|
ค้นหาจำนวนการแข่งขันทั้งหมด
|
Find the total number of matches.
|
CREATE TABLE players (first_name VARCHAR, birth_date VARCHAR, country_code VARCHAR)
|
SELECT first_name, birth_date FROM players WHERE country_code = 'USA'
|
รายชื่อและวันเกิดของผู้เล่นทั้งหมดจากประเทศที่มีรหัส USA
|
List the first name and birth date of all players from the country with code USA.
|
CREATE TABLE matches (loser_age INTEGER, winner_age INTEGER)
|
SELECT AVG(loser_age), AVG(winner_age) FROM matches
|
ค้นหาอายุเฉลี่ยของผู้แพ้และผู้ชนะการแข่งขันทั้งหมด
|
Find the average age of losers and winners of all matches.
|
CREATE TABLE matches (winner_rank INTEGER)
|
SELECT AVG(winner_rank) FROM matches
|
ค้นหาอันดับเฉลี่ยของผู้ชนะในการแข่งขันทั้งหมด
|
Find the average rank of winners in all matches.
|
CREATE TABLE matches (loser_rank INTEGER)
|
SELECT MIN(loser_rank) FROM matches
|
ค้นหาผู้แพ้อันดับสูงสุดในทุกแมตช์
|
Find the highest rank of losers in all matches.
|
CREATE TABLE players (country_code VARCHAR)
|
SELECT COUNT(DISTINCT country_code) FROM players
|
ค้นหาหมายเลขรหัสประเทศที่แตกต่างกันของผู้เล่นทุกคน
|
find the number of distinct country codes of all players.
|
CREATE TABLE matches (loser_name VARCHAR)
|
SELECT COUNT(DISTINCT loser_name) FROM matches
|
ค้นหาจำนวนชื่อที่ชัดเจนของผู้แพ้
|
Find the number of distinct name of losers.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.