context
stringlengths 27
489
| answer
stringlengths 18
557
| question_th
stringlengths 8
226
| question_en
stringlengths 12
244
|
---|---|---|---|
CREATE TABLE customers (customer_type_code VARCHAR) | SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1 | ประเภทลูกค้ามีลูกค้ากี่รายและมีลูกค้ามากที่สุด? | How many customers are there in the customer type with the most customers? |
CREATE TABLE staff (last_name VARCHAR, staff_id VARCHAR); CREATE TABLE complaints (staff_id VARCHAR, date_complaint_raised VARCHAR) | SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1 | นามสกุลของพนักงานที่จัดการเรื่องร้องเรียนครั้งแรกคืออะไร? | What is the last name of the staff who has handled the first ever complaint? |
CREATE TABLE complaints (complaint_type_code VARCHAR) | SELECT COUNT(DISTINCT complaint_type_code) FROM complaints | มีรหัสประเภทการร้องเรียนที่แตกต่างกันกี่รหัสในฐานข้อมูล | How many distinct complaint type codes are there in the database? |
CREATE TABLE customers (address_line_1 VARCHAR, address_line_2 VARCHAR, email_address VARCHAR) | SELECT address_line_1, address_line_2 FROM customers WHERE email_address = "[email protected]" | ค้นหาที่อยู่บรรทัดที่ 1 และ 2 ของลูกค้าด้วยอีเมล "[email protected]" | Find the address line 1 and 2 of the customer with email "[email protected]". |
CREATE TABLE complaints (complaint_status_code VARCHAR, complaint_type_code VARCHAR) | SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = "Product Failure" GROUP BY complaint_status_code | ค้นหาจำนวนข้อร้องเรียนด้วยประเภท Product Failure สำหรับแต่ละสถานะข้อร้องเรียน | Find the number of complaints with Product Failure type for each complaint status. |
CREATE TABLE complaints (staff_id VARCHAR); CREATE TABLE staff (first_name VARCHAR, staff_id VARCHAR) | SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY COUNT(*) LIMIT 5 | ชื่อแรกของพนักงาน 5 อันดับแรกที่จัดการข้อร้องเรียนจำนวนมากที่สุดคืออะไร? | What is first names of the top 5 staff who have handled the greatest number of complaints? |
CREATE TABLE customers (state VARCHAR) | SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) LIMIT 1 | รัฐใดมีลูกค้ามากที่สุด? | Which state has the most customers? |
CREATE TABLE submission (Id VARCHAR) | SELECT COUNT(*) FROM submission | มีส่งกี่รายการคะ? | How many submissions are there? |
CREATE TABLE submission (Author VARCHAR, Scores VARCHAR) | SELECT Author FROM submission ORDER BY Scores | รายชื่อผู้เขียนผลงานเรียงตามคะแนนจากน้อยไปหามาก | List the authors of submissions in ascending order of scores. |
CREATE TABLE submission (Author VARCHAR, College VARCHAR) | SELECT Author, College FROM submission | ผู้เขียนผลงานที่ส่งเข้าประกวดและวิทยาลัยของพวกเขาคือใคร? | What are the authors of submissions and their colleges? |
CREATE TABLE submission (Author VARCHAR, College VARCHAR) | SELECT Author FROM submission WHERE College = "Florida" OR College = "Temple" | แสดงชื่อผู้เขียนจากวิทยาลัย "ฟลอริดา" หรือ "วัด" | Show the names of authors from college "Florida" or "Temple" |
CREATE TABLE submission (Scores INTEGER) | SELECT AVG(Scores) FROM submission | คะแนนเฉลี่ยของการส่งคืออะไร? | What is the average score of submissions? |
CREATE TABLE submission (Author VARCHAR, Scores VARCHAR) | SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1 | ผู้เขียนผลงานที่ได้คะแนนสูงสุดคือใคร? | What is the author of the submission with the highest score? |
CREATE TABLE submission (College VARCHAR) | SELECT College, COUNT(*) FROM submission GROUP BY College | แสดงวิทยาลัยต่างๆ พร้อมด้วยจำนวนผู้เขียนที่ส่งผลงานจากแต่ละวิทยาลัย | Show different colleges along with the number of authors of submission from each college. |
CREATE TABLE submission (College VARCHAR) | SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1 | แสดงวิทยาลัยผู้เขียนส่งผลงานที่พบบ่อยที่สุด | Show the most common college of authors of submissions. |
CREATE TABLE submission (College VARCHAR, Scores INTEGER) | SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80 | แสดงวิทยาลัยที่มีทั้งผู้เขียนที่มีคะแนนส่งมากกว่า 90 และผู้แต่งที่มีคะแนนส่งน้อยกว่า 80 | Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80. |
CREATE TABLE acceptance (Result VARCHAR, Submission_ID VARCHAR); CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR) | SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID | แสดงผู้เขียนผลงานที่ส่งและผลการยอมรับของผลงานที่ส่ง | Show the authors of submissions and the acceptance results of their submissions. |
CREATE TABLE acceptance (Result VARCHAR, Submission_ID VARCHAR); CREATE TABLE submission (Submission_ID VARCHAR, Scores VARCHAR) | SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1 | แสดงผลการส่งที่มีคะแนนสูงสุด | Show the result of the submission with the highest score. |
CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE acceptance (workshop_id VARCHAR, Submission_ID VARCHAR) | SELECT T2.Author, COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author | แสดงผู้เขียนแต่ละคนและจำนวนการประชุมเชิงปฏิบัติการที่พวกเขาส่งไป | Show each author and the number of workshops they submitted to. |
CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE acceptance (Submission_ID VARCHAR, workshop_id VARCHAR) | SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1 | แสดงผู้เขียนที่มีผลงานส่งเข้าร่วมเวิร์คช็อปมากกว่าหนึ่งรายการ | Show the authors who have submissions to more than one workshop. |
CREATE TABLE workshop (Date VARCHAR, Venue VARCHAR) | SELECT Date, Venue FROM workshop ORDER BY Venue | แสดงวันที่และสถานที่ของแต่ละเวิร์คช็อปโดยเรียงตามตัวอักษรของสถานที่ | Show the date and venue of each workshop in ascending alphabetical order of the venue. |
CREATE TABLE acceptance (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR) | SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance) | รายชื่อผู้เขียนที่ไม่มีการส่งผลงานเข้าเวิร์คช็อปใดๆ | List the authors who do not have submission to any workshop. |
CREATE TABLE INVESTORS (Id VARCHAR) | SELECT COUNT(*) FROM INVESTORS | ค้นหาจำนวนผู้ลงทุนทั้งหมด | Find the number of investors in total. |
CREATE TABLE INVESTORS (Investor_details VARCHAR) | SELECT Investor_details FROM INVESTORS | แสดงรายละเอียดนักลงทุนทั้งหมด | Show all investor details. |
CREATE TABLE LOTS (lot_details VARCHAR) | SELECT DISTINCT lot_details FROM LOTS | แสดงรายละเอียดล็อตที่แตกต่างกันทั้งหมด | Show all distinct lot details. |
CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER) | SELECT MAX(amount_of_transaction) FROM TRANSACTIONS | แสดงจำนวนการทำธุรกรรมสูงสุด | Show the maximum amount of transaction. |
CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR) | SELECT date_of_transaction, share_count FROM TRANSACTIONS | แสดงวันที่และจำนวนหุ้นของการทำธุรกรรมทั้งหมด | Show all date and share count of transactions. |
CREATE TABLE TRANSACTIONS (share_count INTEGER) | SELECT SUM(share_count) FROM TRANSACTIONS | ส่วนแบ่งการทำธุรกรรมทั้งหมดคือเท่าไร? | What is the total share of transactions? |
CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, transaction_type_code VARCHAR) | SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR' | แสดงรหัสธุรกรรมทั้งหมดด้วยรหัสธุรกรรม 'PUR' | Show all transaction ids with transaction code 'PUR'. |
CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, transaction_type_code VARCHAR) | SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = "SALE" | แสดงวันที่ทำรายการทั้งหมดที่มีรหัสประเภท "SALE" | Show all dates of transactions whose type code is "SALE". |
CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER, transaction_type_code VARCHAR) | SELECT AVG(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = "SALE" | แสดงจำนวนรายการเฉลี่ยด้วยรหัสประเภท "SALE" | Show the average amount of transactions with type code "SALE". |
CREATE TABLE Ref_Transaction_Types (transaction_type_description VARCHAR, transaction_type_code VARCHAR) | SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code = "PUR" | แสดงคำอธิบายประเภทธุรกรรมด้วยรหัส "PUR" | Show the description of transaction type with code "PUR". |
CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER, transaction_type_code VARCHAR, share_count VARCHAR) | SELECT MIN(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = "PUR" AND share_count > 50 | แสดงจำนวนธุรกรรมขั้นต่ำที่มีรหัสประเภท "PUR" และมีจำนวนหุ้นมากกว่า 50 | Show the minimum amount of transactions whose type code is "PUR" and whose share count is bigger than 50. |
CREATE TABLE TRANSACTIONS (share_count INTEGER, amount_of_transaction INTEGER) | SELECT MAX(share_count) FROM TRANSACTIONS WHERE amount_of_transaction < 10000 | แสดงจำนวนหุ้นสูงสุดของธุรกรรมที่จำนวนเงินน้อยกว่า 10,000 | Show the maximum share count of transactions where the amount is smaller than 10000 |
CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR, amount_of_transaction VARCHAR) | SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000 | แสดงวันที่ทำรายการหากจำนวนหุ้นมากกว่า 100 หรือจำนวนมากกว่า 1,000 | Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000. |
CREATE TABLE Ref_Transaction_Types (transaction_type_description VARCHAR, transaction_type_code VARCHAR); CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, transaction_type_code VARCHAR, share_count INTEGER) | SELECT T1.transaction_type_description, T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10 | แสดงคำอธิบายประเภทธุรกรรมและวันที่หากจำนวนหุ้นน้อยกว่า 10 | Show the transaction type descriptions and dates if the share count is smaller than 10. |
CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) | SELECT T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100 | แสดงรายละเอียดของนักลงทุนทั้งหมดหากทำธุรกรรมใด ๆ ที่มีจำนวนหุ้นมากกว่า 100 | Show details of all investors if they make any transaction with share count greater than 100. |
CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR) | SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS | มีการใช้ธุรกรรมประเภทที่แตกต่างกันกี่ประเภทในธุรกรรม? | How many distinct transaction types are used in the transactions? |
CREATE TABLE LOTS (lot_details VARCHAR, investor_id VARCHAR) | SELECT lot_details, investor_id FROM LOTS | ส่งคืนรายละเอียดล็อตและรหัสนักลงทุน | Return the lot details and investor ids. |
CREATE TABLE LOTS (lot_details VARCHAR, investor_id VARCHAR); CREATE TABLE INVESTORS (investor_id VARCHAR, Investor_details VARCHAR) | SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l" | คืนรายละเอียดล็อตของล็อตที่เป็นของผู้ลงทุนพร้อมรายละเอียด "l" หรือไม่? | Return the lot details of lots that belong to investors with details "l"? |
CREATE TABLE PURCHASES (purchase_details VARCHAR, purchase_transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, amount_of_transaction INTEGER) | SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000 | รายละเอียดการซื้อของธุรกรรมที่มีมูลค่ามากกว่า 10,000 คืออะไร? | What are the purchase details of transactions with amount bigger than 10000? |
CREATE TABLE SALES (sales_details VARCHAR, sales_transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, transaction_id VARCHAR, amount_of_transaction INTEGER) | SELECT T1.sales_details, T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000 | รายละเอียดการขายและวันที่ทำรายการที่มียอดน้อยกว่า 3,000 คืออะไร? | What are the sale details and dates of transactions with amount smaller than 3000? |
CREATE TABLE LOTS (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE TRANSACTIONS_LOTS (transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, share_count INTEGER) | SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count < 50 | รายละเอียดล็อตของล็อตที่เกี่ยวข้องกับธุรกรรมที่มีจำนวนหุ้นน้อยกว่า 50 คืออะไร? | What are the lot details of lots associated with transactions with share count smaller than 50? |
CREATE TABLE LOTS (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE TRANSACTIONS_LOTS (transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, share_count VARCHAR, transaction_type_code VARCHAR) | SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = "PUR" | รายละเอียดล็อตของล็อตที่เกี่ยวข้องกับธุรกรรมที่มีจำนวนหุ้นมากกว่า 100 และมีรหัสประเภทคือ "PUR" คืออะไร | What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is "PUR"? |
CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR, amount_of_transaction INTEGER) | SELECT transaction_type_code, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code | แสดงมูลค่าธุรกรรมเฉลี่ยสำหรับธุรกรรมประเภทต่างๆ | Show the average transaction amount for different transaction types. |
CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR, share_count INTEGER) | SELECT transaction_type_code, MAX(share_count), MIN(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code | แสดงจำนวนหุ้นสูงสุดและต่ำสุดของธุรกรรมประเภทต่างๆ | Show the maximum and minimum share count of different transaction types. |
CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER) | SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id | แสดงจำนวนหุ้นเฉลี่ยของการทำธุรกรรมสำหรับนักลงทุนรายต่างๆ | Show the average share count of transactions for different investors. |
CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER) | SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY AVG(share_count) | แสดงจำนวนหุ้นเฉลี่ยของการทำธุรกรรมของนักลงทุนแต่ละราย เรียงตามจำนวนหุ้นเฉลี่ย | Show the average share count of transactions each each investor, ordered by average share count. |
CREATE TABLE TRANSACTIONS (investor_id VARCHAR, amount_of_transaction INTEGER) | SELECT investor_id, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id | แสดงจำนวนธุรกรรมโดยเฉลี่ยสำหรับนักลงทุนรายต่างๆ | Show the average amount of transactions for different investors. |
CREATE TABLE TRANSACTIONS (transaction_id VARCHAR); CREATE TABLE Transactions_Lots (lot_id VARCHAR, transaction_id VARCHAR) | SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id | แสดงจำนวนธุรกรรมเฉลี่ยสำหรับล็อตต่างๆ | Show the average amount of transactions for different lots. |
CREATE TABLE TRANSACTIONS (transaction_id VARCHAR); CREATE TABLE Transactions_Lots (lot_id VARCHAR, transaction_id VARCHAR) | SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY AVG(amount_of_transaction) | แสดงจำนวนธุรกรรมโดยเฉลี่ยสำหรับล็อตต่างๆ โดยเรียงลำดับตามจำนวนธุรกรรมโดยเฉลี่ย | Show the average amount of transactions for different lots, ordered by average amount of transactions. |
CREATE TABLE TRANSACTIONS (investor_id VARCHAR, transaction_type_code VARCHAR) | SELECT investor_id, COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = "SALE" GROUP BY investor_id | แสดงจำนวนรายการที่มีรหัสประเภทธุรกรรม "SALE" สำหรับนักลงทุนรายต่างๆ หากมากกว่า 0 | Show the number of transactions with transaction type code "SALE" for different investors if it is larger than 0. |
CREATE TABLE TRANSACTIONS (investor_id VARCHAR) | SELECT investor_id, COUNT(*) FROM TRANSACTIONS GROUP BY investor_id | แสดงจำนวนธุรกรรมสำหรับนักลงทุนรายต่างๆ | Show the number of transactions for different investors. |
CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR) | SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) LIMIT 1 | แสดงรหัสประเภทธุรกรรมที่เกิดขึ้นน้อยที่สุด | Show the transaction type code that occurs the fewest times. |
CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR) | SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1 | แสดงรหัสประเภทธุรกรรมที่เกิดขึ้นบ่อยที่สุด | Show the transaction type code that occurs the most frequently. |
CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR); CREATE TABLE Ref_Transaction_Types (transaction_type_description VARCHAR, transaction_type_code VARCHAR) | SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1 | แสดงคำอธิบายประเภทธุรกรรมที่เกิดขึ้นบ่อยที่สุด | Show the description of the transaction type that occurs most frequently. |
CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) | SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1 | แสดงรหัสและรายละเอียดของนักลงทุนที่มีจำนวนการทำธุรกรรมมากที่สุด | Show the id and details of the investor that has the largest number of transactions. |
CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) | SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3 | แสดงรหัสและรายละเอียดสำหรับผู้ลงทุนที่มีจำนวนธุรกรรมสูงสุด 3 อันดับแรก | Show the id and details for the investors who have the top 3 number of transactions. |
CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (investor_id VARCHAR) | SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*) >= 2 | แสดงรหัสของผู้ลงทุนที่มีธุรกรรมอย่างน้อยสองรายการ | Show the ids of the investors who have at least two transactions. |
CREATE TABLE TRANSACTIONS (investor_id VARCHAR, transaction_type_code VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) | SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = "SALE" GROUP BY T2.investor_id HAVING COUNT(*) >= 2 | แสดงรหัสและรายละเอียดของผู้ลงทุนที่มีธุรกรรมอย่างน้อย 2 รายการพร้อมรหัสประเภท "SALE" | Show the ids and details of the investors who have at least two transactions with type code "SALE". |
CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR, amount_of_transaction VARCHAR) | SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100 | มียอดหุ้นตั้งแต่ 100 หุ้นขึ้นไป หรือเกิน 100 หุ้น จะทำรายการเมื่อใด | What are the dates of transactions with at least 100 share count or amount bigger than 100? |
CREATE TABLE purchases (sales_details VARCHAR, purchase_details VARCHAR); CREATE TABLE sales (sales_details VARCHAR, purchase_details VARCHAR) | SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases | รายละเอียดการขายและการซื้อทั้งหมดมีอะไรบ้าง? | What are the details of all sales and purchases? |
CREATE TABLE Lots (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE Lots (lot_details VARCHAR); CREATE TABLE transactions_lots (lot_id VARCHAR) | SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id | รายละเอียดของล็อตที่ไม่ได้ใช้ทำรายการมีอะไรบ้าง? | What are the details of the lots which are not used in any transactions? |
CREATE TABLE HOTELS (Id VARCHAR) | SELECT COUNT(*) FROM HOTELS | มีโรงแรมว่างทั้งหมดกี่แห่ง? | How many available hotels are there in total? |
CREATE TABLE HOTELS (price_range VARCHAR) | SELECT price_range FROM HOTELS | โรงแรมราคาเท่าไหร่คะ? | What are the price ranges of hotels? |
CREATE TABLE LOCATIONS (Location_Name VARCHAR) | SELECT DISTINCT Location_Name FROM LOCATIONS | แสดงชื่อสถานที่ที่แตกต่างกันทั้งหมด | Show all distinct location names. |
CREATE TABLE Staff (Name VARCHAR, Other_Details VARCHAR) | SELECT Name, Other_Details FROM Staff | แสดงชื่อและรายละเอียดของพนักงานทุกคน | Show the names and details of all the staff members. |
CREATE TABLE VISITORS (Tourist_Details VARCHAR) | SELECT Tourist_Details FROM VISITORS | แสดงรายละเอียดของผู้เข้าชมทั้งหมด | Show details of all visitors. |
CREATE TABLE HOTELS (price_range VARCHAR, star_rating_code VARCHAR) | SELECT price_range FROM HOTELS WHERE star_rating_code = "5" | แสดงช่วงราคาของโรงแรมระดับ 5 ดาว | Show the price ranges of hotels with 5 star ratings. |
CREATE TABLE HOTELS (price_range INTEGER, star_rating_code VARCHAR, pets_allowed_yn VARCHAR) | SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = "5" AND pets_allowed_yn = 1 | แสดงช่วงราคาเฉลี่ยของโรงแรมที่มีระดับ 5 ดาวและอนุญาตให้นำสัตว์เลี้ยงเข้าได้ | Show the average price range of hotels that have 5 star ratings and allow pets. |
CREATE TABLE LOCATIONS (Address VARCHAR, Location_Name VARCHAR) | SELECT Address FROM LOCATIONS WHERE Location_Name = "UK Gallery" | ที่อยู่ของที่ตั้ง "UK Gallery" คืออะไร? | What is the address of the location "UK Gallery"? |
CREATE TABLE LOCATIONS (Other_Details VARCHAR, Location_Name VARCHAR) | SELECT Other_Details FROM LOCATIONS WHERE Location_Name = "UK Gallery" | รายละเอียดที่ตั้งของ UK Gallery คืออะไร? | What is the detail of the location UK Gallery? |
CREATE TABLE LOCATIONS (Location_Name VARCHAR) | SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE "%film%" | ชื่อสถานที่ใดมีคำว่า "ภาพยนตร์"? | Which location names contain the word "film"? |
CREATE TABLE PHOTOS (Name VARCHAR) | SELECT COUNT(DISTINCT Name) FROM PHOTOS | ภาพถ่ายทั้งหมดมีชื่อที่แตกต่างกันกี่ชื่อ? | How many distinct names are associated with all the photos? |
CREATE TABLE VISITS (Visit_Date VARCHAR) | SELECT DISTINCT Visit_Date FROM VISITS | วันเข้าชมที่ชัดเจนคือเมื่อใด | What are the distinct visit dates? |
CREATE TABLE TOURIST_ATTRACTIONS (Name VARCHAR, How_to_Get_There VARCHAR) | SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus" | สถานที่ท่องเที่ยวที่สามารถนั่งรถบัสเข้าไปได้มีชื่อว่าอะไร? | What are the names of the tourist attractions that can be accessed by bus? |
CREATE TABLE TOURIST_ATTRACTIONS (Name VARCHAR, Opening_Hours VARCHAR, How_to_Get_There VARCHAR) | SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus" OR How_to_Get_There = "walk" | สถานที่ท่องเที่ยวที่สามารถเข้าถึงได้ด้วยรถบัสหรือเดินมีชื่อและเวลาเปิดทำการอะไรบ้าง? | What are the names and opening hours of the tourist attractions that can be accessed by bus or walk? |
CREATE TABLE HOTELS (star_rating_code VARCHAR, price_range INTEGER); CREATE TABLE Ref_Hotel_Star_Ratings (star_rating_description VARCHAR, star_rating_code VARCHAR) | SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000 | คำอธิบายระดับดาวของโรงแรมที่มีราคามากกว่า 10,000 คืออะไร? | What are the star rating descriptions of the hotels with price above 10000? |
CREATE TABLE TOURIST_ATTRACTIONS (Opening_Hours VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE MUSEUMS (Museum_Details VARCHAR, Museum_ID VARCHAR) | SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID | รายละเอียดและเวลาทำการของพิพิธภัณฑ์เป็นอย่างไร? | What are the details and opening hours of the museums? |
CREATE TABLE TOURIST_ATTRACTIONS (Name VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE PHOTOS (Tourist_Attraction_ID VARCHAR, Name VARCHAR) | SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = "game1" | สถานที่ท่องเที่ยวที่เกี่ยวข้องกับภาพถ่าย "เกม 1" ชื่ออะไร? | What is the name of the tourist attraction that is associated with the photo "game1"? |
CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, Name VARCHAR); CREATE TABLE PHOTOS (Name VARCHAR, Description VARCHAR, Tourist_Attraction_ID VARCHAR) | SELECT T1.Name, T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = "film festival" | ภาพถ่ายที่ถ่ายในสถานที่ท่องเที่ยว "เทศกาลภาพยนตร์" มีชื่อและคำอธิบายว่าอะไรบ้าง? | What are the names and descriptions of the photos taken at the tourist attraction "film festival"? |
CREATE TABLE TOURIST_ATTRACTIONS (How_to_Get_There VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE ROYAL_FAMILY (Royal_Family_Details VARCHAR, Royal_Family_ID VARCHAR) | SELECT T1.Royal_Family_Details, T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID | มีรายละเอียดและวิธีการเดินทางไปยังสถานที่ท่องเที่ยวที่เกี่ยวข้องกับราชวงศ์อย่างไรบ้าง? | What are the details and ways to get to tourist attractions related to royal family? |
CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, How_to_Get_There VARCHAR); CREATE TABLE SHOPS (Shop_Details VARCHAR, Shop_ID VARCHAR) | SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" | รายละเอียดร้านค้าที่สามารถเดินเข้าไปได้มีอะไรบ้าง? | What are the details of the shops that can be accessed by walk? |
CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, Name VARCHAR); CREATE TABLE STAFF (Name VARCHAR, Tourist_Attraction_ID VARCHAR) | SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = "US museum" | เจ้าหน้าที่ที่ดูแลสถานที่ท่องเที่ยวชื่อ "พิพิธภัณฑ์สหรัฐฯ" คืออะไร? | What is the name of the staff that is in charge of the attraction named "US museum"? |
CREATE TABLE Street_Markets (Market_Details VARCHAR, Market_ID VARCHAR); CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, How_to_Get_There VARCHAR) | SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" OR T2.How_to_Get_There = "bus" | รายละเอียดของตลาดที่สามารถเดินทางมาได้ด้วยการเดินหรือรถประจำทางมีอะไรบ้าง? | What are the details of the markets that can be accessed by walk or bus? |
CREATE TABLE VISITORS (Tourist_ID VARCHAR, Tourist_Details VARCHAR); CREATE TABLE VISITS (Visit_Date VARCHAR, Visit_Details VARCHAR, Tourist_ID VARCHAR) | SELECT T2.Visit_Date, T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = "Vincent" | วันที่เข้าชมและรายละเอียดของผู้เข้าชมที่มีรายละเอียดคือ 'วินเซนต์' คืออะไร? | What are the visit date and details of the visitor whose detail is 'Vincent'? |
CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE VISITORS (Tourist_ID VARCHAR, Tourist_Details VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) | SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = "Vincent" | สถานที่ท่องเที่ยวใดบ้างที่ผู้มาเยือนมีรายละเอียดการเยี่ยมชม 'Vincent'? | Which tourist attractions does the visitor with detail 'Vincent' visit? |
CREATE TABLE VISITORS (Tourist_ID VARCHAR, Tourist_Details VARCHAR); CREATE TABLE VISITS (Visit_Date VARCHAR, Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) | SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Vincent" OR T2.Tourist_Details = "Vivian" | สถานที่ท่องเที่ยวชื่ออะไร และวันที่นักท่องเที่ยวชื่อวินเซนต์หรือวิเวียนมาเยี่ยมชมที่นั่นมีชื่ออะไรบ้าง? | What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there? |
CREATE TABLE HOTELS (star_rating_code VARCHAR, price_range INTEGER) | SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code | แสดงราคาเฉลี่ยของโรงแรมสำหรับรหัสระดับดาวแต่ละดวง | Show the average price of hotels for each star rating code. |
CREATE TABLE HOTELS (pets_allowed_yn VARCHAR, price_range INTEGER) | SELECT pets_allowed_yn, AVG(price_range) FROM HOTELS GROUP BY pets_allowed_yn | แสดงราคาเฉลี่ยของโรงแรมสำหรับนโยบายสัตว์เลี้ยงต่างๆ | Show the average price of hotels for different pet policy. |
CREATE TABLE HOTELS (hotel_id VARCHAR, star_rating_code VARCHAR, price_range VARCHAR) | SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range | แสดงรหัสและระดับดาวของโรงแรมแต่ละแห่ง เรียงตามราคาจากต่ำไปสูง | Show the id and star rating of each hotel, ordered by its price from low to high. |
CREATE TABLE HOTELS (other_hotel_details VARCHAR, price_range VARCHAR) | SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3 | แสดงรายละเอียดของโรงแรมที่แพงที่สุด 3 อันดับแรก | Show the details of the top 3 most expensive hotels. |
CREATE TABLE HOTELS (other_hotel_details VARCHAR, star_rating_code VARCHAR, price_range VARCHAR) | SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range LIMIT 3 | แสดงรายละเอียดและระดับดาวของโรงแรมที่ถูกที่สุด 3 แห่ง | Show the details and star ratings of the 3 least expensive hotels. |
CREATE TABLE Tourist_Attractions (How_to_Get_There VARCHAR) | SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1 | แสดงวิธีการเดินทางที่คนส่วนใหญ่เลือกเดินทางไปยังสถานที่ท่องเที่ยว | Show the transportation method most people choose to get to tourist attractions. |
CREATE TABLE Ref_Attraction_Types (Attraction_Type_Description VARCHAR, Attraction_Type_Code VARCHAR); CREATE TABLE Tourist_Attractions (Attraction_Type_Code VARCHAR) | SELECT T1.Attraction_Type_Description, T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1 | แสดงคำอธิบายและรหัสของประเภทสถานที่ท่องเที่ยวที่นักท่องเที่ยวส่วนใหญ่อยู่ | Show the description and code of the attraction type most tourist attractions belong to. |
CREATE TABLE Tourist_Attractions (How_to_Get_There VARCHAR) | SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There | แสดงวิธีเดินทางไปยังสถานที่ท่องเที่ยวต่างๆ และจำนวนสถานที่ท่องเที่ยวที่สามารถเข้าถึงได้ในลักษณะที่สอดคล้องกัน | Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way. |
CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) | SELECT T1.Name, T2.Tourist_Attraction_ID, COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID | แสดงชื่อสถานที่ท่องเที่ยว รหัส และจำนวนการเข้าชมที่สอดคล้องกัน | Show different tourist attractions' names, ids, and the corresponding number of visits. |
CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) | SELECT T1.Name, T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) >= 2 | แสดงชื่อและรหัสสถานที่ท่องเที่ยวที่มีการเยี่ยมชมอย่างน้อยสองครั้ง | Show the names and ids of tourist attractions that are visited at least two times. |
CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) | SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) <= 1 | แสดงชื่อและรหัสของสถานที่ท่องเที่ยวที่มีการเยี่ยมชมมากที่สุดหนึ่งครั้ง | Show the names and ids of tourist attractions that are visited at most once. |
CREATE TABLE Tourist_Attractions (Name VARCHAR, Location_ID VARCHAR, How_to_Get_There VARCHAR); CREATE TABLE Locations (Location_ID VARCHAR, Address VARCHAR) | SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = "660 Shea Crescent" OR T2.How_to_Get_There = "walk" | สถานที่ท่องเที่ยวที่สามารถเดินถึงได้ชื่ออะไร หรืออยู่ที่ 660 Shea Crescent? | What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.