context
stringlengths 27
489
| answer
stringlengths 18
557
| question_th
stringlengths 8
226
| question_en
stringlengths 12
244
|
---|---|---|---|
CREATE TABLE loan (branch_id VARCHAR); CREATE TABLE bank (bname VARCHAR, branch_id VARCHAR)
|
SELECT SUM(amount), T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname
|
ค้นหาจำนวนสินเชื่อทั้งหมดที่เสนอโดยแต่ละสาขาของธนาคาร
|
Find the total amount of loans offered by each bank branch.
|
CREATE TABLE customer (cust_name VARCHAR, cust_id VARCHAR); CREATE TABLE loan (cust_id VARCHAR)
|
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING COUNT(*) > 1
|
ค้นหาชื่อลูกค้าที่มีสินเชื่อมากกว่าหนึ่งรายการ
|
Find the name of customers who have more than one loan.
|
CREATE TABLE loan (cust_id VARCHAR, amount INTEGER); CREATE TABLE customer (cust_name VARCHAR, acc_type VARCHAR, cust_id VARCHAR)
|
SELECT T1.cust_name, T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name HAVING SUM(T2.amount) > 5000
|
ค้นหาชื่อและยอดเงินในบัญชีของลูกค้าที่มีสินเชื่อรวมมากกว่า 5,000
|
Find the name and account balance of the customers who have loans with a total amount of more than 5000.
|
CREATE TABLE loan (branch_id VARCHAR, amount INTEGER); CREATE TABLE bank (bname VARCHAR, branch_id VARCHAR)
|
SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id GROUP BY T1.bname ORDER BY SUM(T2.amount) DESC LIMIT 1
|
ค้นหาชื่อสาขาของธนาคารที่ให้สินเชื่อรวมมากที่สุด
|
Find the name of bank branch that provided the greatest total amount of loans.
|
CREATE TABLE loan (branch_id VARCHAR, cust_id VARCHAR, amount INTEGER); CREATE TABLE bank (bname VARCHAR, branch_id VARCHAR); CREATE TABLE customer (cust_id VARCHAR, credit_score INTEGER)
|
SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY SUM(T1.amount) DESC LIMIT 1
|
ค้นหาชื่อสาขาธนาคารที่ให้สินเชื่อรวมสูงสุดแก่ลูกค้าที่มีคะแนนเครดิตน้อยกว่า 100
|
Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.
|
CREATE TABLE loan (branch_id VARCHAR); CREATE TABLE bank (bname VARCHAR, branch_id VARCHAR)
|
SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id
|
ค้นหาชื่อสาขาธนาคารที่ให้สินเชื่อบางส่วน
|
Find the name of bank branches that provided some loans.
|
CREATE TABLE customer (cust_name VARCHAR, credit_score VARCHAR, cust_id VARCHAR); CREATE TABLE loan (cust_id VARCHAR)
|
SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id
|
ค้นหาชื่อและคะแนนเครดิตของลูกค้าที่มีสินเชื่อบางส่วน
|
Find the name and credit score of the customers who have some loans.
|
CREATE TABLE customer (cust_name VARCHAR, cust_id VARCHAR); CREATE TABLE loan (cust_id VARCHAR)
|
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000
|
ค้นหาชื่อลูกค้าที่มีวงเงินกู้ตั้งแต่ 3,000 ขึ้นไป
|
Find the the name of the customers who have a loan with amount more than 3000.
|
CREATE TABLE bank (bname VARCHAR, city VARCHAR, branch_id VARCHAR); CREATE TABLE loan (branch_id VARCHAR, loan_type VARCHAR)
|
SELECT T1.bname, T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T2.loan_type = 'Business'
|
ค้นหาเมืองและชื่อสาขาของธนาคารที่ให้บริการสินเชื่อธุรกิจ
|
Find the city and name of bank branches that provide business loans.
|
CREATE TABLE bank (bname VARCHAR, branch_id VARCHAR); CREATE TABLE customer (cust_id VARCHAR, credit_score INTEGER); CREATE TABLE loan (branch_id VARCHAR, cust_id VARCHAR)
|
SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100
|
ค้นหาชื่อสาขาของธนาคารที่ให้สินเชื่อแก่ลูกค้าที่มีคะแนนเครดิตต่ำกว่า 100
|
Find the names of bank branches that have provided a loan to any customer whose credit score is below 100.
|
CREATE TABLE bank (branch_id VARCHAR, state VARCHAR); CREATE TABLE loan (amount INTEGER, branch_id VARCHAR)
|
SELECT SUM(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id = T2.branch_id WHERE T1.state = 'New York'
|
ค้นหาจำนวนเงินกู้ทั้งหมดที่สาขาของธนาคารในรัฐนิวยอร์กให้ไว้
|
Find the total amount of loans provided by bank branches in the state of New York.
|
CREATE TABLE loan (credit_score INTEGER, cust_id VARCHAR); CREATE TABLE customer (credit_score INTEGER, cust_id VARCHAR)
|
SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)
|
ค้นหาคะแนนเครดิตเฉลี่ยของลูกค้าที่มีสินเชื่อบางส่วน
|
Find the average credit score of the customers who have some loan.
|
CREATE TABLE loan (credit_score INTEGER, cust_id VARCHAR); CREATE TABLE customer (credit_score INTEGER, cust_id VARCHAR)
|
SELECT AVG(credit_score) FROM customer WHERE NOT cust_id IN (SELECT cust_id FROM loan)
|
ค้นหาคะแนนเครดิตเฉลี่ยของลูกค้าที่ไม่มีสินเชื่อ
|
Find the average credit score of the customers who do not have any loan.
|
CREATE TABLE ASSESSMENT_NOTES (Id VARCHAR)
|
SELECT COUNT(*) FROM ASSESSMENT_NOTES
|
มีบันทึกการประเมินทั้งหมดกี่ฉบับ?
|
How many assessment notes are there in total?
|
CREATE TABLE Assessment_Notes (date_of_notes VARCHAR)
|
SELECT date_of_notes FROM Assessment_Notes
|
บันทึกการประเมินคือวันที่เท่าไร?
|
What are the dates of the assessment notes?
|
CREATE TABLE ADDRESSES (zip_postcode VARCHAR)
|
SELECT COUNT(*) FROM ADDRESSES WHERE zip_postcode = "197"
|
มีที่อยู่กี่แห่งที่มีรหัสไปรษณีย์ 197
|
How many addresses have zip code 197?
|
CREATE TABLE Behavior_Incident (incident_type_code VARCHAR)
|
SELECT COUNT(DISTINCT incident_type_code) FROM Behavior_Incident
|
มีรหัสประเภทเหตุการณ์ที่แตกต่างกันกี่รหัส
|
How many distinct incident type codes are there?
|
CREATE TABLE Detention (detention_type_code VARCHAR)
|
SELECT DISTINCT detention_type_code FROM Detention
|
ส่งคืนรหัสประเภทการกักขังที่แตกต่างกันทั้งหมด
|
Return all distinct detention type codes.
|
CREATE TABLE Behavior_Incident (date_incident_start VARCHAR, date_incident_end VARCHAR, incident_type_code VARCHAR)
|
SELECT date_incident_start, date_incident_end FROM Behavior_Incident WHERE incident_type_code = "NOISE"
|
วันที่เริ่มต้นและสิ้นสุดสำหรับเหตุการณ์ที่มีรหัสประเภทเหตุการณ์ "NOISE" คือเมื่อใด
|
What are the start and end dates for incidents with incident type code "NOISE"?
|
CREATE TABLE Detention (detention_summary VARCHAR)
|
SELECT detention_summary FROM Detention
|
กลับสรุปการควบคุมตัวทั้งหมด
|
Return all detention summaries.
|
CREATE TABLE STUDENTS (cell_mobile_number VARCHAR, email_address VARCHAR)
|
SELECT cell_mobile_number, email_address FROM STUDENTS
|
คืนหมายเลขโทรศัพท์มือถือและที่อยู่อีเมลของนักเรียนทุกคน
|
Return the cell phone number and email address for all students.
|
CREATE TABLE Students (email_address VARCHAR, first_name VARCHAR, last_name VARCHAR)
|
SELECT email_address FROM Students WHERE first_name = "Emma" AND last_name = "Rohan"
|
อีเมลของนักเรียนชื่อ "เอ็มม่า" และนามสกุล "โรฮาน" คืออะไร?
|
What is the email of the student with first name "Emma" and last name "Rohan"?
|
CREATE TABLE Students_in_Detention (student_id VARCHAR)
|
SELECT COUNT(DISTINCT student_id) FROM Students_in_Detention
|
มีนักเรียนที่แตกต่างกันกี่คนที่ถูกคุมขัง?
|
How many distinct students have been in detention?
|
CREATE TABLE TEACHERS (gender VARCHAR, last_name VARCHAR)
|
SELECT gender FROM TEACHERS WHERE last_name = "Medhurst"
|
ครูที่มีนามสกุล "เมดเฮิร์สต์" เพศอะไร?
|
What is the gender of the teacher with last name "Medhurst"?
|
CREATE TABLE Ref_Incident_Type (incident_type_description VARCHAR, incident_type_code VARCHAR)
|
SELECT incident_type_description FROM Ref_Incident_Type WHERE incident_type_code = "VIOLENCE"
|
คำอธิบายประเภทเหตุการณ์สำหรับประเภทเหตุการณ์ที่มีรหัส "ความรุนแรง" คืออะไร
|
What is the incident type description for the incident type with code "VIOLENCE"?
|
CREATE TABLE Student_Addresses (monthly_rental INTEGER)
|
SELECT MAX(monthly_rental), MIN(monthly_rental) FROM Student_Addresses
|
ค้นหาค่าเช่ารายเดือนสูงสุดและต่ำสุดสำหรับที่อยู่ของนักเรียนทั้งหมด
|
Find the maximum and minimum monthly rental for all student addresses.
|
CREATE TABLE Teachers (first_name VARCHAR, email_address VARCHAR)
|
SELECT first_name FROM Teachers WHERE email_address LIKE '%man%'
|
ค้นหาชื่อครูที่มีที่อยู่อีเมลที่มีคำว่า "ชาย"
|
Find the first names of teachers whose email address contains the word "man".
|
CREATE TABLE Assessment_Notes (date_of_notes VARCHAR)
|
SELECT * FROM Assessment_Notes ORDER BY date_of_notes
|
แสดงรายการข้อมูลทั้งหมดเกี่ยวกับบันทึกการประเมินโดยจัดเรียงตามวันที่จากน้อยไปหามาก
|
List all information about the assessment notes sorted by date in ascending order.
|
CREATE TABLE Addresses (city VARCHAR)
|
SELECT city FROM Addresses ORDER BY city
|
ระบุเมืองที่อยู่ทั้งหมดตามลำดับตัวอักษร
|
List all cities of addresses in alphabetical order.
|
CREATE TABLE Teachers (first_name VARCHAR, last_name VARCHAR)
|
SELECT first_name, last_name FROM Teachers ORDER BY last_name
|
ค้นหาชื่อและนามสกุลของครูตามลำดับตัวอักษรของนามสกุล
|
Find the first names and last names of teachers in alphabetical order of last name.
|
CREATE TABLE Student_Addresses (monthly_rental VARCHAR)
|
SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC
|
ค้นหาข้อมูลทั้งหมดเกี่ยวกับที่อยู่ของนักเรียน และจัดเรียงตามค่าเช่ารายเดือนจากมากไปน้อย
|
Find all information about student addresses, and sort by monthly rental in descending order.
|
CREATE TABLE Students (first_name VARCHAR, student_id VARCHAR); CREATE TABLE Assessment_Notes (student_id VARCHAR)
|
SELECT T1.student_id, T2.first_name FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
|
ค้นหารหัสและชื่อของนักเรียนที่มีบันทึกการประเมินมากที่สุด?
|
Find the id and first name of the student that has the most number of assessment notes?
|
CREATE TABLE Assessment_Notes (teacher_id VARCHAR); CREATE TABLE Teachers (first_name VARCHAR, teacher_id VARCHAR)
|
SELECT T1.teacher_id, T2.first_name FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id GROUP BY T1.teacher_id ORDER BY COUNT(*) DESC LIMIT 3
|
ค้นหารหัสและชื่อของครู 3 คนที่มีบันทึกการประเมินมากที่สุด?
|
Find the ids and first names of the 3 teachers that have the most number of assessment notes?
|
CREATE TABLE Students (last_name VARCHAR, student_id VARCHAR); CREATE TABLE Behavior_Incident (student_id VARCHAR)
|
SELECT T1.student_id, T2.last_name FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1
|
ค้นหารหัสและนามสกุลนักศึกษาที่มีเหตุการณ์พฤติกรรมมากที่สุด?
|
Find the id and last name of the student that has the most behavior incidents?
|
CREATE TABLE Detention (teacher_id VARCHAR, detention_type_code VARCHAR); CREATE TABLE Teachers (last_name VARCHAR, teacher_id VARCHAR)
|
SELECT T1.teacher_id, T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T1.detention_type_code = "AFTER" GROUP BY T1.teacher_id ORDER BY COUNT(*) DESC LIMIT 1
|
ค้นหา ID และนามสกุลครูที่ถูกกักขังมากที่สุด พร้อมรหัสประเภทกักขัง “AFTER”?
|
Find the id and last name of the teacher that has the most detentions with detention type code "AFTER"?
|
CREATE TABLE Students (first_name VARCHAR, student_id VARCHAR); CREATE TABLE Student_Addresses (student_id VARCHAR)
|
SELECT T1.student_id, T2.first_name FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY AVG(monthly_rental) DESC LIMIT 1
|
รหัสและชื่อของนักเรียนที่มีที่อยู่มีค่าเช่าเฉลี่ยต่อเดือนสูงสุดคืออะไร?
|
What are the id and first name of the student whose addresses have the highest average monthly rental?
|
CREATE TABLE Student_Addresses (address_id VARCHAR); CREATE TABLE Addresses (city VARCHAR, address_id VARCHAR)
|
SELECT T2.address_id, T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1
|
ค้นหารหัสและเมืองของที่อยู่นักเรียนที่มีค่าเช่าเฉลี่ยต่อเดือนสูงสุด
|
Find the id and city of the student address with the highest average monthly rental.
|
CREATE TABLE Ref_Incident_Type (incident_type_description VARCHAR, incident_type_code VARCHAR); CREATE TABLE Behavior_Incident (incident_type_code VARCHAR)
|
SELECT T1.incident_type_code, T2.incident_type_description FROM Behavior_Incident AS T1 JOIN Ref_Incident_Type AS T2 ON T1.incident_type_code = T2.incident_type_code GROUP BY T1.incident_type_code ORDER BY COUNT(*) DESC LIMIT 1
|
รหัสและคำอธิบายของประเภทเหตุการณ์พฤติกรรมที่พบบ่อยที่สุดคืออะไร
|
What are the code and description of the most frequent behavior incident type?
|
CREATE TABLE Ref_Detention_Type (detention_type_description VARCHAR, detention_type_code VARCHAR); CREATE TABLE Detention (detention_type_code VARCHAR)
|
SELECT T1.detention_type_code, T2.detention_type_description FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code = T2.detention_type_code GROUP BY T1.detention_type_code ORDER BY COUNT(*) LIMIT 1
|
ประเภทการกักขังที่พบบ่อยที่สุดมีรหัสและคำอธิบายอย่างไร
|
What are the code and description of the least frequent detention type ?
|
CREATE TABLE Students (student_id VARCHAR, first_name VARCHAR); CREATE TABLE Assessment_Notes (date_of_notes VARCHAR, student_id VARCHAR)
|
SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = "Fanny"
|
ค้นหาวันที่บันทึกการประเมินสำหรับนักเรียนที่มีชื่อ "แฟนนี่"
|
Find the dates of assessment notes for students with first name "Fanny".
|
CREATE TABLE Assessment_Notes (text_of_notes VARCHAR, teacher_id VARCHAR); CREATE TABLE Teachers (teacher_id VARCHAR, last_name VARCHAR)
|
SELECT T1.text_of_notes FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = "Schuster"
|
ค้นหาข้อความบันทึกการประเมินสำหรับครูที่มีนามสกุล "ชูสเตอร์"
|
Find the texts of assessment notes for teachers with last name "Schuster".
|
CREATE TABLE Behavior_Incident (date_incident_start VARCHAR, student_id VARCHAR); CREATE TABLE Students (student_id VARCHAR, last_name VARCHAR)
|
SELECT T1.date_incident_start, date_incident_end FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.last_name = "Fahey"
|
ค้นหาวันเริ่มต้นและสิ้นสุดเหตุการณ์พฤติกรรมของนักศึกษาโดยใช้นามสกุล "ฟ้าเฮย์"
|
Find the start and end dates of behavior incidents of students with last name "Fahey".
|
CREATE TABLE Detention (datetime_detention_start VARCHAR, teacher_id VARCHAR); CREATE TABLE Teachers (teacher_id VARCHAR, last_name VARCHAR)
|
SELECT T1.datetime_detention_start, datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id = T2.teacher_id WHERE T2.last_name = "Schultz"
|
ค้นหาวันเริ่มต้นและสิ้นสุดการกักขังครูด้วยนามสกุล “ชูลท์ซ”
|
Find the start and end dates of detentions of teachers with last name "Schultz".
|
CREATE TABLE Student_Addresses (address_id VARCHAR); CREATE TABLE Addresses (zip_postcode VARCHAR, address_id VARCHAR)
|
SELECT T2.address_id, T1.zip_postcode FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id ORDER BY monthly_rental DESC LIMIT 1
|
รหัสและรหัสไปรษณีย์ของที่อยู่ที่มีค่าเช่ารายเดือนสูงสุดคืออะไร?
|
What are the id and zip code of the address with the highest monthly rental?
|
CREATE TABLE Students (cell_mobile_number VARCHAR, student_id VARCHAR); CREATE TABLE Student_Addresses (student_id VARCHAR, monthly_rental VARCHAR)
|
SELECT T2.cell_mobile_number FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.monthly_rental LIMIT 1
|
หมายเลขโทรศัพท์มือถือของนักเรียนที่มีที่อยู่ให้เช่ารายเดือนต่ำที่สุดคืออะไร?
|
What is the cell phone number of the student whose address has the lowest monthly rental?
|
CREATE TABLE Addresses (address_id VARCHAR, state_province_county VARCHAR); CREATE TABLE Student_Addresses (monthly_rental VARCHAR, address_id VARCHAR)
|
SELECT T2.monthly_rental FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = "Texas"
|
ที่อยู่ของนักเรียนในรัฐเท็กซัสให้เช่ารายเดือนเท่าไร?
|
What are the monthly rentals of student addresses in Texas state?
|
CREATE TABLE Addresses (address_id VARCHAR, state_province_county VARCHAR); CREATE TABLE Students (first_name VARCHAR, last_name VARCHAR, address_id VARCHAR)
|
SELECT T2.first_name, T2.last_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = "Wisconsin"
|
ชื่อและนามสกุลของนักเรียนที่มีที่อยู่ในรัฐวิสคอนซินคืออะไร
|
What are the first names and last names of students with address in Wisconsin state?
|
CREATE TABLE Addresses (line_1 VARCHAR, address_id VARCHAR); CREATE TABLE Student_Addresses (monthly_rental INTEGER, address_id VARCHAR)
|
SELECT T1.line_1, AVG(T2.monthly_rental) FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id GROUP BY T2.address_id
|
บรรทัดที่ 1 และค่าเช่ารายเดือนเฉลี่ยของที่อยู่นักเรียนทั้งหมดคือเท่าใด
|
What are the line 1 and average monthly rentals of all student addresses?
|
CREATE TABLE Teachers (address_id VARCHAR, first_name VARCHAR); CREATE TABLE Addresses (zip_postcode VARCHAR, address_id VARCHAR)
|
SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = "Lyla"
|
รหัสไปรษณีย์ของที่อยู่ของครูชื่อ "ไลลา" คืออะไร?
|
What is the zip code of the address where the teacher with first name "Lyla" lives?
|
CREATE TABLE Addresses (address_id VARCHAR, zip_postcode VARCHAR); CREATE TABLE Teachers (email_address VARCHAR, address_id VARCHAR)
|
SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id WHERE T1.zip_postcode = "918"
|
ที่อยู่อีเมลของครูที่มีที่อยู่รหัสไปรษณีย์ "918" คืออะไร?
|
What are the email addresses of teachers whose address has zip code "918"?
|
CREATE TABLE STUDENTS (student_id VARCHAR); CREATE TABLE Behavior_Incident (student_id VARCHAR)
|
SELECT COUNT(*) FROM STUDENTS WHERE NOT student_id IN (SELECT student_id FROM Behavior_Incident)
|
มีนักเรียนกี่คนที่ไม่เกี่ยวข้องกับเหตุการณ์พฤติกรรมใดๆ
|
How many students are not involved in any behavior incident?
|
CREATE TABLE Teachers (last_name VARCHAR); CREATE TABLE Teachers (last_name VARCHAR, teacher_id VARCHAR); CREATE TABLE Detention (teacher_id VARCHAR)
|
SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id = T2.teacher_id
|
ค้นหานามสกุลครูที่ไม่เกี่ยวข้องกับการคุมขังใดๆ
|
Find the last names of teachers who are not involved in any detention.
|
CREATE TABLE Teachers (address_id VARCHAR); CREATE TABLE Students (address_id VARCHAR); CREATE TABLE Addresses (line_1 VARCHAR, address_id VARCHAR)
|
SELECT T1.line_1 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id INTERSECT SELECT T1.line_1 FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id = T2.address_id
|
ที่อยู่บรรทัดที่ 1 ที่นักเรียนและครูบางคนแชร์คืออะไร
|
What are the line 1 of addresses shared by some students and some teachers?
|
CREATE TABLE Assets (asset_id VARCHAR, asset_details VARCHAR); CREATE TABLE Asset_Parts (asset_id VARCHAR); CREATE TABLE Fault_Log (asset_id VARCHAR)
|
SELECT T1.asset_id, T1.asset_details FROM Assets AS T1 JOIN Asset_Parts AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING COUNT(*) = 2 INTERSECT SELECT T1.asset_id, T1.asset_details FROM Assets AS T1 JOIN Fault_Log AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING COUNT(*) < 2
|
สินทรัพย์ใดมี 2 ส่วนและมีบันทึกข้อผิดพลาดน้อยกว่า 2 รายการ ระบุรหัสสินทรัพย์และรายละเอียด
|
Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail.
|
CREATE TABLE Assets (maintenance_contract_id VARCHAR); CREATE TABLE Maintenance_Contracts (maintenance_contract_id VARCHAR)
|
SELECT COUNT(*), T1.maintenance_contract_id FROM Maintenance_Contracts AS T1 JOIN Assets AS T2 ON T1.maintenance_contract_id = T2.maintenance_contract_id GROUP BY T1.maintenance_contract_id
|
สัญญาการบำรุงรักษาแต่ละฉบับมีสินทรัพย์จำนวนเท่าใด ระบุหมายเลขและรหัสสัญญา
|
How many assets does each maintenance contract contain? List the number and the contract id.
|
CREATE TABLE Assets (supplier_company_id VARCHAR); CREATE TABLE Third_Party_Companies (company_id VARCHAR)
|
SELECT COUNT(*), T1.company_id FROM Third_Party_Companies AS T1 JOIN Assets AS T2 ON T1.company_id = T2.supplier_company_id GROUP BY T1.company_id
|
บริษัทบุคคลที่สามแต่ละแห่งจัดหาสินทรัพย์จำนวนเท่าใด แสดงรายการจำนวนและรหัสบริษัท
|
How many assets does each third party company supply? List the count and the company id.
|
CREATE TABLE Maintenance_Contracts (maintenance_contract_company_id VARCHAR); CREATE TABLE Maintenance_Engineers (company_id VARCHAR); CREATE TABLE Third_Party_Companies (company_id VARCHAR, company_name VARCHAR)
|
SELECT T1.company_id, T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Engineers AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id HAVING COUNT(*) >= 2 UNION SELECT T3.company_id, T3.company_name FROM Third_Party_Companies AS T3 JOIN Maintenance_Contracts AS T4 ON T3.company_id = T4.maintenance_contract_company_id GROUP BY T3.company_id HAVING COUNT(*) >= 2
|
บริษัทบุคคลที่สามใดที่มีวิศวกรซ่อมบำรุงอย่างน้อย 2 คน หรือมีสัญญาบำรุงรักษาอย่างน้อย 2 ฉบับ ระบุรหัสบริษัทและชื่อ
|
Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name.
|
CREATE TABLE Engineer_Visits (contact_staff_id VARCHAR); CREATE TABLE Staff (staff_name VARCHAR, staff_id VARCHAR); CREATE TABLE Fault_Log (recorded_by_staff_id VARCHAR)
|
SELECT T1.staff_name, T1.staff_id FROM Staff AS T1 JOIN Fault_Log AS T2 ON T1.staff_id = T2.recorded_by_staff_id EXCEPT SELECT T3.staff_name, T3.staff_id FROM Staff AS T3 JOIN Engineer_Visits AS T4 ON T3.staff_id = T4.contact_staff_id
|
ชื่อและรหัสของเจ้าหน้าที่ที่บันทึกบันทึกข้อผิดพลาดแต่ไม่ได้ติดต่อกับวิศวกรที่มาเยี่ยมคนใดเลย?
|
What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers?
|
CREATE TABLE Maintenance_Engineers (engineer_id VARCHAR, first_name VARCHAR, last_name VARCHAR); CREATE TABLE Engineer_Visits (Id VARCHAR)
|
SELECT T1.engineer_id, T1.first_name, T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 GROUP BY T1.engineer_id ORDER BY COUNT(*) DESC LIMIT 1
|
วิศวกรคนไหนเข้าเยี่ยมชมบ่อยที่สุด? แสดงรหัสวิศวกร ชื่อ และนามสกุล
|
Which engineer has visited the most times? Show the engineer id, first name and last name.
|
CREATE TABLE Parts (part_name VARCHAR, part_id VARCHAR); CREATE TABLE Part_Faults (part_id VARCHAR)
|
SELECT T1.part_name, T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_id HAVING COUNT(*) > 2
|
ชิ้นส่วนใดมีข้อบกพร่องมากกว่า 2 ข้อ? แสดงชื่อชิ้นส่วนและรหัส
|
Which parts have more than 2 faults? Show the part name and id.
|
CREATE TABLE Maintenance_Engineers (first_name VARCHAR, last_name VARCHAR, other_details VARCHAR, engineer_id VARCHAR); CREATE TABLE Engineer_Skills (engineer_id VARCHAR, skill_id VARCHAR); CREATE TABLE Skills (skill_description VARCHAR, skill_id VARCHAR)
|
SELECT T1.first_name, T1.last_name, T1.other_details, T3.skill_description FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id
|
ระบุชื่อ นามสกุล รายละเอียด และคำอธิบายทักษะที่ตอบสนองความต้องการของวิศวกรทุกคน
|
List all every engineer's first name, last name, details and coresponding skill description.
|
CREATE TABLE Skills_Required_To_Fix (part_fault_id VARCHAR, skill_id VARCHAR); CREATE TABLE Part_Faults (fault_short_name VARCHAR, part_fault_id VARCHAR); CREATE TABLE Skills (skill_description VARCHAR, skill_id VARCHAR)
|
SELECT T1.fault_short_name, T3.skill_description FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id
|
สำหรับข้อบกพร่องทั้งหมดของส่วนต่างๆ ทักษะที่จำเป็นในการแก้ไขมีอะไรบ้าง ระบุชื่อข้อบกพร่องและคำอธิบายทักษะ
|
For all the faults of different parts, what are all the decriptions of the skills required to fix them? List the name of the faults and the skill description.
|
CREATE TABLE Parts (part_name VARCHAR, part_id VARCHAR); CREATE TABLE Asset_Parts (part_id VARCHAR)
|
SELECT T1.part_name, COUNT(*) FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name
|
แต่ละชิ้นส่วนสามารถใช้ในทรัพย์สินได้จำนวนเท่าใด ระบุชื่อชิ้นส่วนและหมายเลข
|
How many assets can each parts be used in? List the part name and the number.
|
CREATE TABLE Fault_Log (fault_description VARCHAR, fault_log_entry_id VARCHAR); CREATE TABLE Fault_Log_Parts (fault_status VARCHAR, fault_log_entry_id VARCHAR)
|
SELECT T1.fault_description, T2.fault_status FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id
|
คำอธิบายข้อบกพร่องทั้งหมดและสถานะข้อบกพร่องของข้อบกพร่องทั้งหมดที่บันทึกไว้ในบันทึกคืออะไร
|
What are all the fault descriptions and the fault status of all the faults recoreded in the logs?
|
CREATE TABLE Fault_Log (fault_log_entry_id VARCHAR); CREATE TABLE Engineer_Visits (fault_log_entry_id VARCHAR)
|
SELECT COUNT(*), T1.fault_log_entry_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY COUNT(*) DESC LIMIT 1
|
จำเป็นต้องมีการเยี่ยมชมวิศวกรมากที่สุดกี่ครั้งสำหรับบันทึกข้อผิดพลาดเดียว ระบุหมายเลขและรหัสรายการบันทึก
|
How many engineer visits are required at most for a single fault log? List the number and the log entry id.
|
CREATE TABLE Maintenance_Engineers (last_name VARCHAR)
|
SELECT DISTINCT last_name FROM Maintenance_Engineers
|
นามสกุลที่แตกต่างกันของวิศวกรทั้งหมดคืออะไร?
|
What are all the distinct last names of all the engineers?
|
CREATE TABLE Fault_Log_Parts (fault_status VARCHAR)
|
SELECT DISTINCT fault_status FROM Fault_Log_Parts
|
มีการบันทึกรหัสสถานะข้อบกพร่องจำนวนเท่าใดในตารางชิ้นส่วนบันทึกข้อผิดพลาด
|
How many fault status codes are recorded in the fault log parts table?
|
CREATE TABLE Engineer_Visits (first_name VARCHAR, last_name VARCHAR, engineer_id VARCHAR); CREATE TABLE Maintenance_Engineers (first_name VARCHAR, last_name VARCHAR, engineer_id VARCHAR)
|
SELECT first_name, last_name FROM Maintenance_Engineers WHERE NOT engineer_id IN (SELECT engineer_id FROM Engineer_Visits)
|
วิศวกรคนไหนไม่เคยไปเยี่ยมชมเพื่อรักษาทรัพย์สิน? ระบุชื่อและนามสกุลวิศวกร
|
Which engineers have never visited to maintain the assets? List the engineer first name and last name.
|
CREATE TABLE Assets (asset_id VARCHAR, asset_details VARCHAR, asset_make VARCHAR, asset_model VARCHAR)
|
SELECT asset_id, asset_details, asset_make, asset_model FROM Assets
|
ระบุรหัสสินทรัพย์ รายละเอียด ยี่ห้อ และรุ่นของสินทรัพย์ทุกรายการ
|
List the asset id, details, make and model for every asset.
|
CREATE TABLE Assets (asset_acquired_date VARCHAR)
|
SELECT asset_acquired_date FROM Assets ORDER BY asset_acquired_date LIMIT 1
|
สินทรัพย์แรกได้มาเมื่อใด?
|
When was the first asset acquired?
|
CREATE TABLE Part_Faults (part_id VARCHAR, part_fault_id VARCHAR); CREATE TABLE Skills_Required_To_Fix (part_fault_id VARCHAR); CREATE TABLE Parts (part_id VARCHAR, part_name VARCHAR)
|
SELECT T1.part_id, T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id JOIN Skills_Required_To_Fix AS T3 ON T2.part_fault_id = T3.part_fault_id GROUP BY T1.part_id ORDER BY COUNT(*) DESC LIMIT 1
|
ข้อบกพร่องของชิ้นส่วนใดต้องใช้ทักษะจำนวนมากที่สุดในการแก้ไข รายการรหัสและชื่อชิ้นส่วน
|
Which part fault requires the most number of skills to fix? List part id and name.
|
CREATE TABLE Parts (part_name VARCHAR, part_id VARCHAR); CREATE TABLE Part_Faults (part_id VARCHAR)
|
SELECT T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id GROUP BY T1.part_name ORDER BY COUNT(*) LIMIT 1
|
ชิ้นส่วนใดมีข้อผิดพลาดน้อยที่สุด? ระบุชื่อชิ้นส่วน
|
Which kind of part has the least number of faults? List the part name.
|
CREATE TABLE Engineer_Visits (engineer_id VARCHAR); CREATE TABLE Maintenance_Engineers (engineer_id VARCHAR, first_name VARCHAR, last_name VARCHAR)
|
SELECT T1.engineer_id, T1.first_name, T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 ON T1.engineer_id = T2.engineer_id GROUP BY T1.engineer_id ORDER BY COUNT(*) LIMIT 1
|
ในบรรดาวิศวกรที่เคยเข้าเยี่ยมชม วิศวกรคนใดเข้าเยี่ยมชมน้อยที่สุด? ระบุรหัสวิศวกร ชื่อ และนามสกุล
|
Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, first name and last name.
|
CREATE TABLE Engineer_Visits (contact_staff_id VARCHAR, engineer_id VARCHAR); CREATE TABLE Staff (staff_name VARCHAR, staff_id VARCHAR); CREATE TABLE Maintenance_Engineers (first_name VARCHAR, last_name VARCHAR, engineer_id VARCHAR)
|
SELECT T1.staff_name, T3.first_name, T3.last_name FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id = T3.engineer_id
|
เจ้าหน้าที่คนไหนติดต่อวิศวกรคนไหน? ระบุชื่อพนักงานและชื่อและนามสกุลวิศวกร
|
Which staff have contacted which engineers? List the staff name and the engineer first name and last name.
|
CREATE TABLE Fault_Log (fault_log_entry_id VARCHAR, fault_description VARCHAR, fault_log_entry_datetime VARCHAR); CREATE TABLE Fault_Log_Parts (fault_log_entry_id VARCHAR)
|
SELECT T1.fault_log_entry_id, T1.fault_description, T1.fault_log_entry_datetime FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY COUNT(*) DESC LIMIT 1
|
บันทึกข้อผิดพลาดใดที่มีชิ้นส่วนที่ผิดพลาดมากที่สุด แสดงรายการรหัสบันทึกข้อผิดพลาด คำอธิบาย และเวลาบันทึก
|
Which fault log included the most number of faulty parts? List the fault log id, description and record time.
|
CREATE TABLE Skills (skill_id VARCHAR, skill_description VARCHAR); CREATE TABLE Skills_Required_To_Fix (skill_id VARCHAR)
|
SELECT T1.skill_id, T1.skill_description FROM Skills AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.skill_id = T2.skill_id GROUP BY T1.skill_id ORDER BY COUNT(*) DESC LIMIT 1
|
ทักษะใดใช้ในการแก้ไขข้อผิดพลาดได้มากที่สุด? ระบุรหัสทักษะและคำอธิบาย
|
Which skill is used in fixing the most number of faults? List the skill id and description.
|
CREATE TABLE Assets (asset_model VARCHAR)
|
SELECT DISTINCT asset_model FROM Assets
|
โมเดลสินทรัพย์ที่แตกต่างกันทั้งหมดมีอะไรบ้าง?
|
What are all the distinct asset models?
|
CREATE TABLE Assets (asset_make VARCHAR, asset_model VARCHAR, asset_details VARCHAR, asset_disposed_date VARCHAR)
|
SELECT asset_make, asset_model, asset_details FROM Assets ORDER BY asset_disposed_date
|
แสดงรายการทรัพย์สินทั้งหมดยี่ห้อ รุ่น รายละเอียดตามวันที่จำหน่ายโดยเรียงจากน้อยไปมาก
|
List the all the assets make, model, details by the disposed date ascendingly.
|
CREATE TABLE Parts (part_id VARCHAR, chargeable_amount VARCHAR)
|
SELECT part_id, chargeable_amount FROM Parts ORDER BY chargeable_amount LIMIT 1
|
ส่วนใดมีค่าใช้จ่ายน้อยที่สุด? ระบุรหัสชิ้นส่วนและจำนวน
|
Which part has the least chargeable amount? List the part id and amount.
|
CREATE TABLE Third_Party_Companies (company_name VARCHAR, company_id VARCHAR); CREATE TABLE Maintenance_Contracts (maintenance_contract_company_id VARCHAR, contract_start_date VARCHAR)
|
SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id ORDER BY T2.contract_start_date LIMIT 1
|
บริษัทใดที่เริ่มสัญญาการบำรุงรักษาเร็วที่สุด? แสดงชื่อบริษัท
|
Which company started the earliest the maintenance contract? Show the company name.
|
CREATE TABLE Maintenance_Contracts (maintenance_contract_company_id VARCHAR, contract_end_date VARCHAR); CREATE TABLE Third_Party_Companies (company_name VARCHAR, company_id VARCHAR, company_type_code VARCHAR); CREATE TABLE Ref_Company_Types (company_type_code VARCHAR)
|
SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id = T2.maintenance_contract_company_id JOIN Ref_Company_Types AS T3 ON T1.company_type_code = T3.company_type_code ORDER BY T2.contract_end_date DESC LIMIT 1
|
ประเภทของ บริษัท ที่สรุปสัญญาล่าสุดคืออะไร?
|
What is the description of the type of the company who concluded its contracts most recently?
|
CREATE TABLE staff (gender VARCHAR)
|
SELECT gender FROM staff GROUP BY gender ORDER BY COUNT(*) DESC LIMIT 1
|
เพศใดที่ประกอบขึ้นเป็นพนักงานส่วนใหญ่?
|
Which gender makes up the majority of the staff?
|
CREATE TABLE Engineer_Visits (contact_staff_id VARCHAR); CREATE TABLE Staff (staff_name VARCHAR, staff_id VARCHAR)
|
SELECT T1.staff_name, COUNT(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name
|
พนักงานแต่ละคนติดต่อกับวิศวกรกี่คน? ระบุทั้งชื่อเจ้าหน้าที่ติดต่อและจำนวนวิศวกรที่ติดต่อ
|
How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.
|
CREATE TABLE Fault_Log (asset_model VARCHAR, asset_id VARCHAR); CREATE TABLE Assets (asset_model VARCHAR, asset_id VARCHAR)
|
SELECT asset_model FROM Assets WHERE NOT asset_id IN (SELECT asset_id FROM Fault_Log)
|
สินทรัพย์ใดที่ไม่มีบันทึกข้อผิดพลาดใดๆ แสดงรายการแบบจำลองสินทรัพย์
|
Which assets did not incur any fault log? List the asset model.
|
CREATE TABLE station (local_authority VARCHAR, services VARCHAR)
|
SELECT local_authority, services FROM station
|
รายชื่อหน่วยงานท้องถิ่นและบริการที่จัดทำโดยทุกสถานี
|
list the local authorities and services provided by all stations.
|
CREATE TABLE train (train_number VARCHAR, name VARCHAR, TIME VARCHAR)
|
SELECT train_number, name FROM train ORDER BY TIME
|
แสดงหมายเลขและชื่อรถไฟทั้งหมดเรียงตามเวลาตั้งแต่ต้นถึงสาย
|
show all train numbers and names ordered by their time from early to late.
|
CREATE TABLE train (TIME VARCHAR, train_number VARCHAR, destination VARCHAR)
|
SELECT TIME, train_number FROM train WHERE destination = 'Chennai' ORDER BY TIME
|
บอกเวลาและหมายเลขของรถไฟทั้งหมดที่ไปเจนไน เรียงตามเวลา
|
Give me the times and numbers of all trains that go to Chennai, ordered by time.
|
CREATE TABLE train (name VARCHAR)
|
SELECT COUNT(*) FROM train WHERE name LIKE "%Express%"
|
รถไฟขบวนไหนมีคำว่า 'Express' อยู่ในชื่อ?
|
How many trains have 'Express' in their names?
|
CREATE TABLE train (train_number VARCHAR, TIME VARCHAR, origin VARCHAR, destination VARCHAR)
|
SELECT train_number, TIME FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur'
|
ค้นหาหมายเลขและเวลาของรถไฟที่วิ่งจาก เจนไน ไป กูรูวาเยอร์
|
Find the number and time of the train that goes from Chennai to Guruvayur.
|
CREATE TABLE train (origin VARCHAR)
|
SELECT origin, COUNT(*) FROM train GROUP BY origin
|
ค้นหาจำนวนขบวนรถไฟที่เริ่มต้นจากแต่ละต้นทาง
|
Find the number of trains starting from each origin.
|
CREATE TABLE route (train_id VARCHAR); CREATE TABLE train (name VARCHAR, id VARCHAR)
|
SELECT t1.name FROM train AS t1 JOIN route AS t2 ON t1.id = t2.train_id GROUP BY t2.train_id ORDER BY COUNT(*) DESC LIMIT 1
|
ค้นหาชื่อรถไฟที่มีเส้นทางวิ่งผ่านสถานีจำนวนมากที่สุด
|
Find the name of the train whose route runs through greatest number of stations.
|
CREATE TABLE route (station_id VARCHAR); CREATE TABLE station (network_name VARCHAR, services VARCHAR, id VARCHAR)
|
SELECT COUNT(*), t1.network_name, t1.services FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id GROUP BY t2.station_id
|
ค้นหาจำนวนรถไฟของแต่ละสถานี รวมถึงชื่อเครือข่ายสถานีและบริการ
|
Find the number of trains for each station, as well as the station network name and services.
|
CREATE TABLE weekly_weather (day_of_week VARCHAR, high_temperature INTEGER)
|
SELECT AVG(high_temperature), day_of_week FROM weekly_weather GROUP BY day_of_week
|
อุณหภูมิสูงสุดเฉลี่ยในแต่ละวันในสัปดาห์คือเท่าใด?
|
What is the average high temperature for each day of week?
|
CREATE TABLE weekly_weather (low_temperature INTEGER, precipitation INTEGER, station_id VARCHAR); CREATE TABLE station (id VARCHAR, network_name VARCHAR)
|
SELECT MAX(t1.low_temperature), AVG(t1.precipitation) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id WHERE t2.network_name = "Amersham"
|
ขออุณหภูมิต่ำสุดสูงสุดและปริมาณฝนเฉลี่ยที่สถานีอาเมอร์ชัมหน่อย
|
Give me the maximum low temperature and average precipitation at the Amersham station.
|
CREATE TABLE station (id VARCHAR, local_authority VARCHAR); CREATE TABLE route (station_id VARCHAR, train_id VARCHAR); CREATE TABLE train (name VARCHAR, time VARCHAR, id VARCHAR)
|
SELECT t3.name, t3.time FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern"
|
ค้นหาชื่อและเวลาของรถไฟที่วิ่งผ่านสถานีของหน่วยงานท้องถิ่น Chiltern
|
Find names and times of trains that run through stations for the local authority Chiltern.
|
CREATE TABLE station (services VARCHAR)
|
SELECT COUNT(DISTINCT services) FROM station
|
ทุกสถานีให้บริการที่แตกต่างกันกี่บริการ?
|
How many different services are provided by all stations?
|
CREATE TABLE weekly_weather (station_id VARCHAR); CREATE TABLE station (id VARCHAR, local_authority VARCHAR)
|
SELECT t2.id, t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id ORDER BY AVG(high_temperature) DESC LIMIT 1
|
ค้นหารหัสและหน่วยงานท้องถิ่นของสถานีที่มีอุณหภูมิสูงเฉลี่ยสูงสุด
|
Find the id and local authority of the station with has the highest average high temperature.
|
CREATE TABLE weekly_weather (station_id VARCHAR, precipitation INTEGER); CREATE TABLE station (id VARCHAR, local_authority VARCHAR)
|
SELECT t2.id, t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id HAVING MAX(t1.precipitation) > 50
|
ค้นหารหัสและหน่วยงานท้องถิ่นของสถานีที่มีปริมาณฝนสูงสุดมากกว่า 50
|
Find the id and local authority of the station whose maximum precipitation is higher than 50.
|
CREATE TABLE weekly_weather (low_temperature INTEGER, wind_speed_mph INTEGER)
|
SELECT MIN(low_temperature), MAX(wind_speed_mph) FROM weekly_weather
|
แสดงอุณหภูมิต่ำสุดและความเร็วลมสูงสุด หน่วยเป็นไมล์ต่อชั่วโมง
|
show the lowest low temperature and highest wind speed in miles per hour.
|
CREATE TABLE train (origin VARCHAR)
|
SELECT origin FROM train GROUP BY origin HAVING COUNT(*) > 1
|
ค้นหาต้นทางที่รถไฟมากกว่า 1 ขบวนเริ่มต้น
|
Find the origins from which more than 1 train starts.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.