context
stringlengths 27
489
| answer
stringlengths 18
557
| question_th
stringlengths 8
226
| question_en
stringlengths 12
244
|
---|---|---|---|
CREATE TABLE professor (dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR)
|
SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = "Accounting"
|
หาจำนวนอาจารย์ประจำภาควิชาบัญชี
|
Find the number of professors in accounting department.
|
CREATE TABLE CLASS (PROF_NUM VARCHAR, CRS_CODE VARCHAR)
|
SELECT COUNT(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = "ACCT-211"
|
ชั้นเรียนสอนด้วยรหัส ACCT-211 มีอาจารย์กี่คน
|
How many professors are teaching class with code ACCT-211?
|
CREATE TABLE professor (dept_code VARCHAR, EMP_NUM VARCHAR); CREATE TABLE department (dept_code VARCHAR); CREATE TABLE employee (EMP_FNAME VARCHAR, EMP_LNAME VARCHAR, EMP_NUM VARCHAR)
|
SELECT T3.EMP_FNAME, T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = "Biology"
|
ชื่อและนามสกุลของศาสตราจารย์ภาควิชาชีววิทยาคืออะไร?
|
What is the first and last name of the professor in biology department?
|
CREATE TABLE CLASS (PROF_NUM VARCHAR); CREATE TABLE employee (EMP_FNAME VARCHAR, EMP_DOB VARCHAR, EMP_NUM VARCHAR)
|
SELECT DISTINCT T1.EMP_FNAME, T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = "ACCT-211"
|
ชื่อและวันเกิดของอาจารย์ที่สอนหลักสูตร ACCT-211 คืออะไร?
|
What are the first names and date of birth of professors teaching course ACCT-211?
|
CREATE TABLE CLASS (PROF_NUM VARCHAR); CREATE TABLE employee (EMP_NUM VARCHAR, EMP_LNAME VARCHAR)
|
SELECT COUNT(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'
|
ศาสตราจารย์ที่มีนามสกุล Graztevski มีกี่ชั้นเรียน?
|
How many classes are professor whose last name is Graztevski has?
|
CREATE TABLE department (school_code VARCHAR, dept_name VARCHAR)
|
SELECT school_code FROM department WHERE dept_name = "Accounting"
|
รหัสโรงเรียนที่เป็นแผนกบัญชีคืออะไร?
|
What is the code of the school where the accounting department belongs to?
|
CREATE TABLE course (crs_credit VARCHAR, crs_description VARCHAR, crs_code VARCHAR)
|
SELECT crs_credit, crs_description FROM course WHERE crs_code = 'CIS-220'
|
หลักสูตร CIS-220 มีหน่วยกิตกี่หน่วยกิต และมีคำอธิบายอะไรบ้าง
|
How many credits does course CIS-220 have, and what its description?
|
CREATE TABLE department (dept_address VARCHAR, dept_name VARCHAR)
|
SELECT dept_address FROM department WHERE dept_name = 'History'
|
ที่อยู่ของแผนกประวัติศาสตร์คืออะไร?
|
what is the address of history department?
|
CREATE TABLE department (dept_address VARCHAR, school_code VARCHAR)
|
SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'
|
โรงเรียนที่มีรหัส BUS มีสถานที่ตั้งที่แตกต่างกันทั้งหมดกี่แห่ง
|
How many different locations does the school with code BUS has?
|
CREATE TABLE department (school_code VARCHAR, dept_address VARCHAR)
|
SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code
|
แต่ละโรงเรียนมีสถานที่ต่างกันกี่แห่ง?
|
How many different locations does each school have?
|
CREATE TABLE course (crs_credit VARCHAR, crs_description VARCHAR, crs_code VARCHAR)
|
SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261'
|
ค้นหาคำอธิบายและเครดิตของหลักสูตร QM-261 หรือไม่
|
Find the description and credit for the course QM-261?
|
CREATE TABLE department (school_code VARCHAR, dept_name VARCHAR)
|
SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code
|
ค้นหาจำนวนแผนกในแต่ละโรงเรียน
|
Find the number of departments in each school.
|
CREATE TABLE department (school_code VARCHAR, dept_name VARCHAR)
|
SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5
|
จงหาจำนวนแผนกต่างๆ ในแต่ละโรงเรียนที่มีจำนวนแผนกต่างๆ น้อยกว่า 5 แผนก
|
Find the number of different departments in each school whose number of different departments is less than 5.
|
CREATE TABLE CLASS (crs_code VARCHAR)
|
SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code
|
แต่ละหลักสูตรมีกี่ส่วน?
|
How many sections does each course has?
|
CREATE TABLE course (dept_code VARCHAR, crs_credit INTEGER)
|
SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code
|
แต่ละแผนกเสนอสินเชื่อรวมเป็นเท่าใด?
|
What is the total credit does each department offer?
|
CREATE TABLE CLASS (class_room VARCHAR)
|
SELECT COUNT(*), class_room FROM CLASS GROUP BY class_room HAVING COUNT(*) >= 2
|
ค้นหาจำนวนชั้นเรียนที่เปิดสอนสำหรับห้องเรียนทั้งหมดที่มีชั้นเรียนอย่างน้อย 2 ชั้นเรียน
|
Find the number of classes offered for all class rooms that held at least 2 classes.
|
CREATE TABLE CLASS (crs_code VARCHAR); CREATE TABLE course (crs_code VARCHAR)
|
SELECT COUNT(*), dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code
|
ค้นหาจำนวนชั้นเรียนในแต่ละแผนก
|
Find the number of classes in each department.
|
CREATE TABLE department (school_code VARCHAR, dept_code VARCHAR); CREATE TABLE CLASS (crs_code VARCHAR); CREATE TABLE course (crs_code VARCHAR, dept_code VARCHAR)
|
SELECT COUNT(*), T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code
|
ค้นหาจำนวนชั้นเรียนในแต่ละโรงเรียน
|
Find the number of classes in each school.
|
CREATE TABLE department (school_code VARCHAR, dept_code VARCHAR); CREATE TABLE professor (dept_code VARCHAR)
|
SELECT COUNT(*), T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code
|
อาจารย์ประจำโรงเรียนต่างกันมีจำนวนเท่าไร?
|
What is the number of professors for different school?
|
CREATE TABLE employee (emp_jobcode VARCHAR)
|
SELECT emp_jobcode, COUNT(*) FROM employee GROUP BY emp_jobcode ORDER BY COUNT(*) DESC LIMIT 1
|
ค้นหาจำนวนและรหัสงานที่มีพนักงานมากที่สุด
|
Find the count and code of the job has most employees.
|
CREATE TABLE department (school_code VARCHAR, dept_code VARCHAR); CREATE TABLE professor (dept_code VARCHAR)
|
SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY COUNT(*) LIMIT 1
|
โรงเรียนใดมีอาจารย์น้อยที่สุด?
|
Which school has the smallest amount of professors?
|
CREATE TABLE professor (dept_code VARCHAR, prof_high_degree VARCHAR)
|
SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code
|
ค้นหาจำนวนอาจารย์ที่มีปริญญาเอก ปริญญาในแต่ละแผนก
|
Find the number of professors with a Ph.D. degree in each department.
|
CREATE TABLE student (dept_code VARCHAR)
|
SELECT COUNT(*), dept_code FROM student GROUP BY dept_code
|
ค้นหาจำนวนนักศึกษาในแต่ละแผนก
|
Find the number of students for each department.
|
CREATE TABLE student (dept_code VARCHAR, stu_hrs INTEGER)
|
SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code
|
หาจำนวนชั่วโมงที่ทำไปแล้วของนักศึกษาทุกคนในแต่ละแผนก
|
Find the total number of hours have done for all students in each department.
|
CREATE TABLE student (dept_code VARCHAR, stu_gpa INTEGER)
|
SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_code
|
ค้นหาเกรดเฉลี่ยสูงสุด ค่าเฉลี่ย และต่ำสุดของนักเรียนทั้งหมดในแต่ละแผนก
|
Find the max, average, and minimum gpa of all students in each department.
|
CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE student (stu_gpa INTEGER, dept_code VARCHAR)
|
SELECT T2.dept_name, AVG(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY AVG(T1.stu_gpa) DESC LIMIT 1
|
ชื่อและเกรดเฉลี่ยของภาควิชาที่นักเรียนมีเกรดเฉลี่ยสูงสุดคืออะไร
|
What is the name and the average gpa of department whose students have the highest average gpa?
|
CREATE TABLE department (school_code VARCHAR)
|
SELECT COUNT(DISTINCT school_code) FROM department
|
มีโรงเรียนทั้งหมดกี่โรงเรียน?
|
how many schools exist in total?
|
CREATE TABLE CLASS (class_code VARCHAR)
|
SELECT COUNT(DISTINCT class_code) FROM CLASS
|
มีกี่ชั้นเรียนที่แตกต่างกัน?
|
How many different classes are there?
|
CREATE TABLE CLASS (crs_code VARCHAR)
|
SELECT COUNT(DISTINCT crs_code) FROM CLASS
|
มีกี่หลักสูตรที่เปิดสอน?
|
How many courses are offered?
|
CREATE TABLE department (dept_name VARCHAR)
|
SELECT COUNT(DISTINCT dept_name) FROM department
|
วิทยาลัยมีกี่แผนก?
|
How many departments does the college has?
|
CREATE TABLE course (dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR)
|
SELECT COUNT(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = "Computer Info. Systems"
|
ข้อมูลคอมพิวเตอร์เปิดสอนกี่หลักสูตร ฝ่ายระบบ?
|
How many courses are offered by the Computer Info. Systems department?
|
CREATE TABLE CLASS (class_section VARCHAR, crs_code VARCHAR)
|
SELECT COUNT(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'
|
หลักสูตร ACCT-211 มีกี่ส่วน?
|
How many sections does course ACCT-211 has?
|
CREATE TABLE CLASS (crs_code VARCHAR); CREATE TABLE course (dept_code VARCHAR, crs_credit INTEGER, crs_code VARCHAR)
|
SELECT SUM(T1.crs_credit), T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code GROUP BY T1.dept_code
|
ค้นหาหน่วยกิตรวมของชั้นเรียนทั้งหมดที่นำเสนอโดยแต่ละแผนก
|
Find the total credits of all classes offered by each department.
|
CREATE TABLE CLASS (crs_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE course (dept_code VARCHAR, crs_code VARCHAR, crs_credit INTEGER)
|
SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code ORDER BY SUM(T1.crs_credit) DESC LIMIT 1
|
ค้นหาชื่อแผนกที่เปิดสอนจำนวนหน่วยกิตมากที่สุดในทุกชั้นเรียน
|
Find the name of the department that offers the largest number of credits of all classes.
|
CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR)
|
SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'
|
มีนักเรียนกี่คนที่ลงทะเบียนในชั้นเรียน ACCT-211
|
How many students enrolled in class ACCT-211?
|
CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR)
|
SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211'
|
ชื่อของนักเรียนแต่ละคนที่ลงทะเบียนในชั้นเรียน ACCT-211 คืออะไร?
|
What is the first name of each student enrolled in class ACCT-211?
|
CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR, enroll_grade VARCHAR)
|
SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C'
|
นักเรียนที่ลงทะเบียนเรียนในห้อง ACCT-211 และได้เกรด C ชื่ออะไร
|
What is the first name of students enrolled in class ACCT-211 and got grade C?
|
CREATE TABLE employee (Id VARCHAR)
|
SELECT COUNT(*) FROM employee
|
ค้นหาจำนวนพนักงานทั้งหมด
|
Find the total number of employees.
|
CREATE TABLE professor (prof_high_degree VARCHAR)
|
SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.'
|
มีอาจารย์กี่คนที่มีปริญญาเอก ระดับ?
|
How many professors do have a Ph.D. degree?
|
CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE course (crs_code VARCHAR, dept_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR)
|
SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting'
|
มีนักเรียนกี่คนที่ลงทะเบียนเรียนในชั้นเรียนที่สอนโดยอาจารย์จากแผนกบัญชี
|
How many students are enrolled in the class taught by some professor from the accounting department?
|
CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE course (dept_code VARCHAR, crs_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)
|
SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY COUNT(*) DESC LIMIT 1
|
แผนกที่มีนักศึกษาลงทะเบียนมากที่สุดชื่ออะไร?
|
What is the name of the department that has the largest number of students enrolled?
|
CREATE TABLE department (dept_name VARCHAR)
|
SELECT dept_name FROM department ORDER BY dept_name
|
รายชื่อแผนกทั้งหมดเรียงตามชื่อ
|
list names of all departments ordered by their names.
|
CREATE TABLE CLASS (class_code VARCHAR, class_room VARCHAR)
|
SELECT class_code FROM CLASS WHERE class_room = 'KLR209'
|
ระบุรหัสของหลักสูตรทั้งหมดที่เกิดขึ้นในห้อง KLR209
|
List the codes of all courses that take place in room KLR209.
|
CREATE TABLE employee (emp_fname VARCHAR, emp_jobcode VARCHAR, emp_dob VARCHAR)
|
SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob
|
ระบุชื่อพนักงานทั้งหมดที่มีรหัสงาน PROF เรียงตามวันเดือนปีเกิด
|
List the first name of all employees with job code PROF ordered by their date of birth.
|
CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
|
SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname
|
ค้นหาชื่อและตำแหน่งตำแหน่งของอาจารย์ทั้งหมดโดยเรียงลำดับตามตัวอักษรของชื่อ
|
Find the first names and offices of all professors sorted by alphabetical order of their first name.
|
CREATE TABLE employee (emp_fname VARCHAR, emp_lname VARCHAR, emp_dob VARCHAR)
|
SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob LIMIT 1
|
ชื่อและนามสกุลของพนักงานที่อายุมากที่สุดคืออะไร?
|
What is the first and last name of the oldest employee?
|
CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_gpa INTEGER, stu_dob VARCHAR)
|
SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1
|
ชื่อ นามสกุล เกรดเฉลี่ยของนักเรียนที่อายุน้อยที่สุดในบรรดานักเรียนที่มีเกรดเฉลี่ยมากกว่า 3 คืออะไร?
|
What is the first, last name, gpa of the youngest one among students whose GPA is above 3?
|
CREATE TABLE student (stu_num VARCHAR); CREATE TABLE enroll (stu_num VARCHAR)
|
SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'
|
นักเรียนที่ได้เกรด C ในชั้นเรียนใดชื่ออะไร
|
What is the first name of students who got grade C in any class?
|
CREATE TABLE professor (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)
|
SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) LIMIT 1
|
ชื่อภาควิชาอะไรมีจำนวนอาจารย์น้อยที่สุด?
|
What is the name of department where has the smallest number of professors?
|
CREATE TABLE professor (dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)
|
SELECT T2.dept_name, T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1
|
แผนกชื่ออะไรที่มีอาจารย์ที่มีปริญญาเอกมากที่สุด ระดับ?
|
What is the name of department where has the largest number of professors with a Ph.D. degree?
|
CREATE TABLE employee (emp_fname VARCHAR, emp_jobcode VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
|
SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num
|
อาจารย์ที่ไม่ได้สอนในชั้นเรียนชื่ออะไร
|
What are the first names of the professors who do not teach a class.
|
CREATE TABLE professor (emp_num VARCHAR, dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
|
SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num
|
อาจารย์ภาควิชาประวัติศาสตร์ที่ไม่ได้สอนในชั้นเรียนมีชื่ออะไร
|
What is the first names of the professors from the history department who do not teach a class.
|
CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE employee (emp_lname VARCHAR, emp_num VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR)
|
SELECT T1.emp_lname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History'
|
นามสกุลและตำแหน่งศาสตราจารย์จากภาควิชาประวัติศาสตร์คืออะไร?
|
What is the last name and office of the professor from the history department?
|
CREATE TABLE employee (emp_num VARCHAR, emp_lname VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR)
|
SELECT T3.dept_name, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T1.emp_lname = 'Heffington'
|
ชื่อแผนกและสำนักงานของศาสตราจารย์ที่มีนามสกุลคือ Heffington คืออะไร?
|
What is department name and office for the professor whose last name is Heffington?
|
CREATE TABLE professor (emp_num VARCHAR, prof_office VARCHAR); CREATE TABLE employee (emp_lname VARCHAR, emp_hiredate VARCHAR, emp_num VARCHAR)
|
SELECT T1.emp_lname, T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102'
|
ค้นหานามสกุลและวันที่จ้างของศาสตราจารย์ที่อยู่ในสำนักงาน DRE 102
|
Find the last name and hire date of the professor who is in office DRE 102.
|
CREATE TABLE student (stu_num VARCHAR, stu_lname VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR); CREATE TABLE CLASS (crs_code VARCHAR, class_code VARCHAR)
|
SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson'
|
นักเรียนนามสกุล Smithson ใช้รหัสรายวิชาอะไร
|
What is the code of the course which the student whose last name is Smithson took?
|
CREATE TABLE student (stu_num VARCHAR, stu_lname VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_credit VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR)
|
SELECT T4.crs_description, T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num JOIN course AS T4 ON T4.crs_code = T1.crs_code WHERE T3.stu_lname = 'Smithson'
|
คำอธิบายและเครดิตของหลักสูตรที่นักเรียนที่มีนามสกุล Smithson ใช้คืออะไร?
|
What are the description and credit of the course which the student whose last name is Smithson took?
|
CREATE TABLE professor (prof_high_degree VARCHAR)
|
SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'
|
มีอาจารย์กี่คนที่มีปริญญาเอกอย่างใดอย่างหนึ่ง หรือปริญญาโท?
|
How many professors who has a either Ph.D. or MA degree?
|
CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (dept_code VARCHAR)
|
SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology'
|
มีอาจารย์จากภาควิชาบัญชีหรือชีววิทยากี่คน?
|
How many professors who are from either Accounting or Biology department?
|
CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
|
SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261'
|
ค้นหาชื่อศาสตราจารย์ที่กำลังสอนสองหลักสูตร รหัส CIS-220 และ QM-261
|
Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261.
|
CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE course (crs_code VARCHAR, dept_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR)
|
SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems'
|
ค้นหาชื่อนักศึกษาที่จะเรียนวิชาบัญชีและข้อมูลคอมพิวเตอร์ แผนกระบบ
|
Find the first name of student who is taking classes from accounting and Computer Info. Systems departments
|
CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_gpa INTEGER, stu_num VARCHAR)
|
SELECT AVG(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211'
|
เกรดเฉลี่ยเฉลี่ยของนักเรียนที่ลงทะเบียนในหลักสูตรที่มีรหัส ACCT-211 คือเท่าใด
|
What is the average gpa of the students enrolled in the course with code ACCT-211?
|
CREATE TABLE student (stu_gpa VARCHAR, stu_phone VARCHAR, stu_fname VARCHAR)
|
SELECT stu_gpa, stu_phone, stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5
|
ชื่อ เกรดเฉลี่ย และหมายเลขโทรศัพท์ของนักเรียน 5 อันดับแรกที่มีเกรดเฉลี่ยสูงสุดคืออะไร?
|
What is the first name, gpa and phone number of the top 5 students with highest gpa?
|
CREATE TABLE student (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)
|
SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1
|
นักเรียนที่มีเกรดเฉลี่ยต่ำสุดอยู่ในชื่อภาควิชาอะไร?
|
What is the department name of the students with lowest gpa belongs to?
|
CREATE TABLE student (stu_fname VARCHAR, stu_gpa INTEGER)
|
SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student)
|
ค้นหาชื่อและเกรดเฉลี่ยของนักเรียนที่มีเกรดเฉลี่ยต่ำกว่าเกรดเฉลี่ยของนักเรียนทุกคน
|
Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.
|
CREATE TABLE student (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_address VARCHAR, dept_code VARCHAR)
|
SELECT T2.dept_name, T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1
|
ค้นหาชื่อและที่อยู่ของภาควิชาที่มีจำนวนนักศึกษามากที่สุด
|
Find the name and address of the department that has the highest number of students.
|
CREATE TABLE student (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_address VARCHAR, dept_code VARCHAR)
|
SELECT T2.dept_name, T2.dept_address, COUNT(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 3
|
ค้นหาชื่อ ที่อยู่ จำนวนนักศึกษาในสาขาวิชาที่มีจำนวนนักศึกษาสูงสุด 3 อันดับแรก
|
Find the name, address, number of students in the departments that have the top 3 highest number of students.
|
CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
|
SELECT T1.emp_fname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.'
|
ค้นหาชื่อและตำแหน่งศาสตราจารย์ที่อยู่ในภาควิชาประวัติศาสตร์และมีวุฒิปริญญาเอก ระดับ.
|
Find the first name and office of the professor who is in the history department and has a Ph.D. degree.
|
CREATE TABLE CLASS (crs_code VARCHAR, prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
|
SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num
|
ค้นหาชื่อผู้สอนทุกคนที่สอนบางหลักสูตรและรหัสหลักสูตร
|
Find the first names of all instructors who have taught some course and the course code.
|
CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR, crs_code VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
|
SELECT T2.emp_fname, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code
|
ค้นหาชื่อผู้สอนทุกคนที่สอนหลักสูตรใดหลักสูตรหนึ่งและคำอธิบายหลักสูตร
|
Find the first names of all instructors who have taught some course and the course description.
|
CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR, crs_code VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
|
SELECT T2.emp_fname, T4.prof_office, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num
|
ค้นหาชื่อและตำแหน่งตำแหน่งของอาจารย์ผู้สอนทุกคนที่สอนหลักสูตรใดหลักสูตรหนึ่งและค้นหาคำอธิบายหลักสูตรด้วย
|
Find the first names and offices of all instructors who have taught some course and also find the course description.
|
CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR, crs_code VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR)
|
SELECT T2.emp_fname, T4.prof_office, T3.crs_description, T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code
|
ค้นหาชื่อและตำแหน่งตำแหน่งของอาจารย์ผู้สอนทุกคนที่สอนหลักสูตรใดหลักสูตรหนึ่ง คำอธิบายหลักสูตร และชื่อแผนกต่างๆ
|
Find the first names and offices of all instructors who have taught some course and the course description and the department name.
|
CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_num VARCHAR)
|
SELECT T1.stu_fname, T1.stu_lname, T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code
|
ค้นหารายชื่อนักเรียนทุกคนที่เรียนหลักสูตรใดหลักสูตรหนึ่งและคำอธิบายหลักสูตร
|
Find names of all students who took some course and the course description.
|
CREATE TABLE enroll (stu_num VARCHAR, enroll_grade VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_num VARCHAR)
|
SELECT T1.stu_fname, T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A'
|
ค้นหารายชื่อนักเรียนทุกคนที่เรียนหลักสูตรใดวิชาหนึ่งแล้วได้ A หรือ C
|
Find names of all students who took some course and got A or C.
|
CREATE TABLE CLASS (class_room VARCHAR, prof_num VARCHAR); CREATE TABLE professor (emp_num VARCHAR, dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
|
SELECT T2.emp_fname, T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting'
|
ค้นหารายชื่ออาจารย์ประจำภาควิชาบัญชีที่กำลังสอนบางหลักสูตรและในห้องเรียนทั้งหมด
|
Find the first names of all professors in the Accounting department who is teaching some course and the class room.
|
CREATE TABLE professor (prof_high_degree VARCHAR, emp_num VARCHAR, dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR)
|
SELECT DISTINCT T2.emp_fname, T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems'
|
ค้นหาชื่อและวุฒิการศึกษาของอาจารย์ที่กำลังสอนบางชั้นเรียนในข้อมูลคอมพิวเตอร์ แผนกระบบ.
|
Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.
|
CREATE TABLE enroll (stu_num VARCHAR, enroll_grade VARCHAR, class_code VARCHAR); CREATE TABLE student (stu_lname VARCHAR, stu_num VARCHAR)
|
SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018
|
นักเรียนที่ได้เกรด A ในชั้นเรียน รหัส 10018 นามสกุลอะไร
|
What is the last name of the student who got a grade A in the class with code 10018.
|
CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
|
SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree <> 'Ph.D.'
|
ค้นหาชื่อและตำแหน่งศาสตราจารย์ประวัติศาสตร์ที่ไม่ได้รับปริญญาเอก ระดับ.
|
Find the first name and office of history professor who did not get a Ph.D. degree.
|
CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR)
|
SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num HAVING COUNT(*) > 1
|
ค้นหาชื่ออาจารย์ที่กำลังสอนมากกว่าหนึ่งชั้นเรียน
|
Find the first names of professors who are teaching more than one class.
|
CREATE TABLE enroll (stu_num VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR)
|
SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING COUNT(*) = 1
|
ค้นหาชื่อนักเรียนที่เข้าเรียนเพียงชั้นเรียนเดียว
|
Find the first names of students who took exactly one class.
|
CREATE TABLE course (dept_code VARCHAR, crs_description VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)
|
SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'
|
ค้นหาชื่อแผนกที่เปิดสอนชั้นเรียนซึ่งมีคำอธิบายซึ่งมีคำว่า "สถิติ"
|
Find the name of department that offers the class whose description has the word "Statistics".
|
CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR, stu_lname VARCHAR)
|
SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname LIKE 'S%'
|
ชื่อของนักเรียนที่มีนามสกุลขึ้นต้นด้วยตัวอักษร S และกำลังเรียนวิชา ACCT-211 คืออะไร
|
What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class?
|
CREATE TABLE club (Id VARCHAR)
|
SELECT COUNT(*) FROM club
|
มีกี่สโมสร?
|
How many clubs are there?
|
CREATE TABLE club (Region VARCHAR)
|
SELECT DISTINCT Region FROM club ORDER BY Region
|
ระบุภูมิภาคที่แตกต่างกันของไม้กอล์ฟโดยเรียงตามตัวอักษรจากน้อยไปหามาก
|
List the distinct region of clubs in ascending alphabetical order.
|
CREATE TABLE club_rank (Gold INTEGER)
|
SELECT AVG(Gold) FROM club_rank
|
จำนวนเหรียญทองเฉลี่ยของสโมสรคือเท่าไร?
|
What is the average number of gold medals for clubs?
|
CREATE TABLE competition (Competition_type VARCHAR, Country VARCHAR)
|
SELECT Competition_type, Country FROM competition
|
การแข่งขันมีประเภทและประเทศอะไรบ้าง?
|
What are the types and countries of competitions?
|
CREATE TABLE competition (YEAR VARCHAR, Competition_type VARCHAR)
|
SELECT DISTINCT YEAR FROM competition WHERE Competition_type <> "Tournament"
|
ปีใดบ้างที่ประเภทการแข่งขันไม่ใช่ "ทัวร์นาเมนท์"?
|
What are the distinct years in which the competitions type is not "Tournament"?
|
CREATE TABLE club_rank (Silver INTEGER)
|
SELECT MAX(Silver), MIN(Silver) FROM club_rank
|
จำนวนเหรียญเงินสูงสุดและต่ำสุดสำหรับสโมสรคือเท่าใด
|
What are the maximum and minimum number of silver medals for clubs.
|
CREATE TABLE club_rank (Total INTEGER)
|
SELECT COUNT(*) FROM club_rank WHERE Total < 10
|
มีกี่สโมสรที่มีเหรียญรางวัลรวมน้อยกว่า 10 เหรียญ?
|
How many clubs have total medals less than 10?
|
CREATE TABLE club (name VARCHAR, Start_year VARCHAR)
|
SELECT name FROM club ORDER BY Start_year
|
รายชื่อสโมสรทั้งหมดโดยเรียงลำดับจากปีเริ่มต้นจากน้อยไปหามาก
|
List all club names in ascending order of start year.
|
CREATE TABLE club (name VARCHAR)
|
SELECT name FROM club ORDER BY name DESC
|
รายชื่อสโมสรทั้งหมดตามลำดับตัวอักษรจากมากไปน้อย
|
List all club names in descending alphabetical order.
|
CREATE TABLE club (name VARCHAR, Club_ID VARCHAR); CREATE TABLE player (Player_id VARCHAR, Club_ID VARCHAR)
|
SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID
|
กรุณาแสดงชื่อและผู้เล่นของสโมสร
|
Please show the names and the players of clubs.
|
CREATE TABLE club (name VARCHAR, Club_ID VARCHAR); CREATE TABLE player (Club_ID VARCHAR, Position VARCHAR)
|
SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = "Right Wing"
|
แสดงชื่อสโมสรที่มีผู้เล่นตำแหน่ง "ปีกขวา"
|
Show the names of clubs that have players with position "Right Wing".
|
CREATE TABLE player (Points INTEGER, Club_ID VARCHAR); CREATE TABLE club (Club_ID VARCHAR, name VARCHAR)
|
SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = "AIB"
|
คะแนนเฉลี่ยของผู้เล่นจากสโมสรชื่อ "AIB" คือเท่าใด
|
What is the average points of players from club with name "AIB".
|
CREATE TABLE player (POSITION VARCHAR, Points INTEGER)
|
SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION
|
ระบุตำแหน่งผู้เล่นและจำนวนคะแนนเฉลี่ยของผู้เล่นแต่ละตำแหน่ง
|
List the position of players and the average number of points of players of each position.
|
CREATE TABLE player (POSITION VARCHAR, name VARCHAR, Points INTEGER)
|
SELECT POSITION FROM player GROUP BY name HAVING AVG(Points) >= 20
|
ระบุตำแหน่งของผู้เล่นที่มีจำนวนคะแนนเฉลี่ยที่ทำได้โดยผู้เล่นในตำแหน่งนั้นมากกว่า 20
|
List the position of players with average number of points scored by players of that position bigger than 20.
|
CREATE TABLE competition (Competition_type VARCHAR)
|
SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type
|
ระบุประเภทการแข่งขันและจำนวนการแข่งขันแต่ละประเภท
|
List the types of competition and the number of competitions of each type.
|
CREATE TABLE competition (Competition_type VARCHAR)
|
SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1
|
แสดงรายการประเภทการแข่งขันที่พบบ่อยที่สุด
|
List the most common type of competition.
|
CREATE TABLE competition (Competition_type VARCHAR)
|
SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5
|
ระบุประเภทการแข่งขันที่มีการแข่งขันประเภทนั้นไม่เกินห้ารายการ
|
List the types of competition that have at most five competitions of that type.
|
CREATE TABLE player (name VARCHAR, Club_ID VARCHAR); CREATE TABLE CLub (name VARCHAR, Club_ID VARCHAR)
|
SELECT name FROM CLub WHERE NOT Club_ID IN (SELECT Club_ID FROM player)
|
รายชื่อสโมสรที่ไม่มีผู้เล่น
|
List the names of clubs that do not have any players.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.