context
stringlengths
27
489
answer
stringlengths
18
557
question_th
stringlengths
8
226
question_en
stringlengths
12
244
CREATE TABLE player (POSITION VARCHAR, Points INTEGER)
SELECT POSITION FROM player WHERE Points > 20 INTERSECT SELECT POSITION FROM player WHERE Points < 10
ตำแหน่งใดที่ผู้เล่นทั้งสองมีมากกว่า 20 แต้มและน้อยกว่า 10 แต้มคือตำแหน่งใด
What are the positions with both players having more than 20 points and less than 10 points.
CREATE TABLE player (Points INTEGER)
SELECT SUM(Points) FROM player
แสดงคะแนนรวมของผู้เล่นทุกคน
Show total points of all players.
CREATE TABLE player (POSITION VARCHAR)
SELECT COUNT(DISTINCT POSITION) FROM player
มีกี่ตำแหน่งที่แตกต่างกัน?
how many different positions are there?
CREATE TABLE player (name VARCHAR, points INTEGER)
SELECT name FROM player WHERE points > (SELECT AVG(points) FROM player)
ผู้เล่นที่ได้คะแนนมากกว่าค่าเฉลี่ยชื่ออะไร
what are the name of players who get more than the average points.
CREATE TABLE player (POSITION VARCHAR, points INTEGER)
SELECT COUNT(*), POSITION FROM player WHERE points < 30 GROUP BY POSITION
หาจำนวนผู้เล่นที่มีคะแนนต่ำกว่า 30 ในแต่ละตำแหน่ง
find the number of players whose points are lower than 30 in each position.
CREATE TABLE competition (country VARCHAR, competition_type VARCHAR)
SELECT country FROM competition WHERE competition_type = 'Tournament' GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1
ประเทศใดที่เข้าร่วมการแข่งขันทัวร์นาเมนท์จำนวนมากที่สุด?
which country did participated in the most number of Tournament competitions?
CREATE TABLE competition (country VARCHAR, competition_type VARCHAR)
SELECT country FROM competition WHERE competition_type = 'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type = 'Tournament'
ประเทศใดได้เข้าร่วมการแข่งขันทั้งประเภทกระชับมิตรและทัวร์นาเมนท์
which countries did participated in both Friendly and Tournament type competitions.
CREATE TABLE competition (country VARCHAR, competition_type VARCHAR)
SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly'
ค้นหาประเทศที่ไม่เคยเข้าร่วมการแข่งขันประเภทกระชับมิตรใดๆ
Find the countries that have never participated in any competition with Friendly type.
CREATE TABLE furniture (num_of_component INTEGER)
SELECT SUM(num_of_component) FROM furniture
มีส่วนประกอบเฟอร์นิเจอร์ทั้งหมดกี่ชิ้น?
How many furniture components are there in total?
CREATE TABLE furniture (name VARCHAR, furniture_id VARCHAR, market_rate VARCHAR)
SELECT name, furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1
คืนชื่อและรหัสเฟอร์นิเจอร์ที่มีอัตราตลาดสูงสุด
Return the name and id of the furniture with the highest market rate.
CREATE TABLE furniture (market_rate INTEGER)
SELECT SUM(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2
หาอัตราตลาดรวมของเฟอร์นิเจอร์ที่มีส่วนแบ่งการตลาด 2 อันดับแรก
find the total market rate of the furnitures that have the top 2 market shares.
CREATE TABLE furniture (Num_of_Component INTEGER, name VARCHAR)
SELECT Num_of_Component, name FROM furniture WHERE Num_of_Component > 10
ค้นหาจำนวนส่วนประกอบและชื่อของเฟอร์นิเจอร์ทั้งหมดที่มีส่วนประกอบมากกว่า 10 ชิ้น
Find the component amounts and names of all furnitures that have more than 10 components.
CREATE TABLE furniture (name VARCHAR, Num_of_Component VARCHAR, market_rate VARCHAR)
SELECT name, Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1
ค้นหาชื่อและจำนวนส่วนประกอบของเฟอร์นิเจอร์ที่ได้รับความนิยมน้อยที่สุด
Find the name and component amount of the least popular furniture.
CREATE TABLE furniture_manufacte (Furniture_ID VARCHAR, Price_in_Dollar INTEGER); CREATE TABLE furniture (name VARCHAR, Furniture_ID VARCHAR); CREATE TABLE furniture_manufacte (Price_in_Dollar INTEGER)
SELECT t1.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID WHERE t2.Price_in_Dollar < (SELECT MAX(Price_in_Dollar) FROM furniture_manufacte)
ค้นหาชื่อเฟอร์นิเจอร์ที่มีราคาต่ำกว่าราคาสูงสุด
Find the names of furnitures whose prices are lower than the highest price.
CREATE TABLE manufacturer (open_year VARCHAR, name VARCHAR, num_of_shops VARCHAR)
SELECT open_year, name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1
ผู้ผลิตรายใดมีจำนวนร้านค้ามากที่สุด? ระบุชื่อและปีที่เปิดดำเนินการ
Which manufacturer has the most number of shops? List its name and year of opening.
CREATE TABLE manufacturer (Num_of_Factories INTEGER, num_of_shops INTEGER)
SELECT AVG(Num_of_Factories) FROM manufacturer WHERE num_of_shops > 20
ค้นหาจำนวนโรงงานโดยเฉลี่ยของผู้ผลิตที่มีร้านค้ามากกว่า 20 แห่ง
Find the average number of factories for the manufacturers that have more than 20 shops.
CREATE TABLE manufacturer (name VARCHAR, manufacturer_id VARCHAR, open_year VARCHAR)
SELECT name, manufacturer_id FROM manufacturer ORDER BY open_year
ระบุชื่อผู้ผลิตและรหัสทั้งหมดเรียงตามปีที่เปิดดำเนินการ
List all manufacturer names and ids ordered by their opening year.
CREATE TABLE manufacturer (name VARCHAR, open_year VARCHAR, num_of_shops VARCHAR, Num_of_Factories VARCHAR)
SELECT name, open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10
ขอชื่อและปีที่เปิดกิจการของผู้ผลิตที่มีโรงงานน้อยกว่า 10 แห่งหรือมากกว่า 10 แห่ง
Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.
CREATE TABLE manufacturer (num_of_shops INTEGER, Num_of_Factories INTEGER, open_year INTEGER)
SELECT MAX(num_of_shops), AVG(Num_of_Factories) FROM manufacturer WHERE open_year < 1990
จำนวนโรงงานโดยเฉลี่ยและจำนวนร้านค้าสูงสุดสำหรับผู้ผลิตที่เปิดก่อนปี 2533 คือเท่าใด
what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.
CREATE TABLE manufacturer (manufacturer_id VARCHAR, num_of_shops VARCHAR); CREATE TABLE furniture_manufacte (manufacturer_id VARCHAR, Price_in_Dollar VARCHAR)
SELECT t1.manufacturer_id, t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1
ค้นหารหัสและจำนวนร้านค้าของบริษัทที่ผลิตเฟอร์นิเจอร์ที่แพงที่สุด
Find the id and number of shops for the company that produces the most expensive furniture.
CREATE TABLE furniture_manufacte (manufacturer_id VARCHAR); CREATE TABLE manufacturer (name VARCHAR, manufacturer_id VARCHAR)
SELECT COUNT(*), t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id GROUP BY t1.manufacturer_id
ค้นหาจำนวนประเภทเฟอร์นิเจอร์ที่ผู้ผลิตแต่ละรายผลิตและชื่อบริษัท
Find the number of funiture types produced by each manufacturer as well as the company names.
CREATE TABLE furniture_manufacte (price_in_dollar VARCHAR, Furniture_ID VARCHAR); CREATE TABLE furniture (name VARCHAR, Furniture_ID VARCHAR)
SELECT t1.name, t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID
ขอชื่อและราคาเฟอร์นิเจอร์ที่บางบริษัทรับผลิตหน่อยค่ะ
Give me the names and prices of furnitures which some companies are manufacturing.
CREATE TABLE furniture (Market_Rate VARCHAR, name VARCHAR, Furniture_ID VARCHAR); CREATE TABLE furniture_manufacte (Market_Rate VARCHAR, name VARCHAR, Furniture_ID VARCHAR)
SELECT Market_Rate, name FROM furniture WHERE NOT Furniture_ID IN (SELECT Furniture_ID FROM furniture_manufacte)
ค้นหาส่วนแบ่งการตลาดและชื่อของเฟอร์นิเจอร์ที่ไม่มีบริษัทใดผลิตในบันทึกของเรา
Find the market shares and names of furnitures which no any company is producing in our records.
CREATE TABLE furniture_manufacte (Furniture_ID VARCHAR, manufacturer_id VARCHAR); CREATE TABLE manufacturer (name VARCHAR, manufacturer_id VARCHAR); CREATE TABLE furniture (Furniture_ID VARCHAR, num_of_component INTEGER)
SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component < 6 INTERSECT SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID = t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id = t3.manufacturer_id WHERE t1.num_of_component > 10
ค้นหาชื่อบริษัทที่ผลิตทั้งเฟอร์นิเจอร์ที่มีส่วนประกอบน้อยกว่า 6 ชิ้น และเฟอร์นิเจอร์ที่มีส่วนประกอบมากกว่า 10 ชิ้น
Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.
CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR); CREATE TABLE employees (first_name VARCHAR, department_id VARCHAR)
SELECT T1.first_name, T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id
แสดงชื่อและชื่อแผนกของพนักงานแต่ละคน
Display the first name and department name for each employee.
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary INTEGER)
SELECT first_name, last_name, salary FROM employees WHERE salary < 6000
ระบุชื่อนามสกุล (ชื่อและนามสกุล) และเงินเดือนสำหรับพนักงานที่มีรายได้ต่ำกว่า 6,000
List the full name (first and last name), and salary for those employees who earn below 6000.
CREATE TABLE employees (first_name VARCHAR, department_id VARCHAR, last_name VARCHAR)
SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen'
แสดงชื่อและหมายเลขแผนกสำหรับพนักงานทุกคนที่มีนามสกุล "แมคอีเวน"
Display the first name, and department number for all employees whose last name is "McEwen".
CREATE TABLE employees (department_id VARCHAR)
SELECT * FROM employees WHERE department_id = "null"
ส่งคืนข้อมูลทั้งหมดสำหรับพนักงานทุกคนโดยไม่มีหมายเลขแผนก
Return all the information for all employees without any department number.
CREATE TABLE departments (department_name VARCHAR)
SELECT * FROM departments WHERE department_name = 'Marketing'
แสดงข้อมูลทั้งหมดเกี่ยวกับแผนกการตลาด
Display all the information about the department Marketing.
CREATE TABLE employees (hire_date VARCHAR, first_name VARCHAR)
SELECT hire_date FROM employees WHERE NOT first_name LIKE '%M%'
วันที่จ้างงานสำหรับพนักงานที่ไม่มีชื่อตัว M คือเมื่อใด
when is the hire date for those employees whose first name does not containing the letter M?
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, salary VARCHAR, department_id VARCHAR)
SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%'
แสดงชื่อเต็ม (ชื่อและนามสกุล) วันที่จ้าง เงินเดือน และหมายเลขแผนกสำหรับพนักงานที่ชื่อไม่ประกอบด้วยตัวอักษร M
display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M.
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, salary VARCHAR, department_id VARCHAR)
SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' ORDER BY department_id
แสดงชื่อนามสกุล (ชื่อและนามสกุล) วันที่จ้าง เงินเดือน และหมายเลขแผนกของพนักงานที่ชื่อไม่ขึ้นต้นด้วยตัวอักษร M และให้ผลลัพธ์เรียงลำดับจากน้อยไปมากตามหมายเลขแผนก
display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M and make the result set in ascending order by department number.
CREATE TABLE employees (phone_number VARCHAR, salary INTEGER)
SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000
หมายเลขโทรศัพท์ของพนักงานที่มีเงินเดือนอยู่ในช่วง 8000 และ 12000 คืออะไร?
what is the phone number of employees whose salary is in the range of 8000 and 12000?
CREATE TABLE employees (department_id VARCHAR, salary VARCHAR, commission_pct VARCHAR)
SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct <> "null" OR department_id <> 40
แสดงข้อมูลทั้งหมดของพนักงานที่มีเงินเดือนอยู่ในช่วง 8,000 และ 12,000 และค่าคอมมิชชันไม่เป็นโมฆะหรือหมายเลขแผนกไม่เท่ากับ 40
display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40.
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary VARCHAR, commission_pct VARCHAR)
SELECT first_name, last_name, salary FROM employees WHERE commission_pct = "null"
ชื่อเต็ม (ชื่อและนามสกุล) และเงินเดือนสำหรับพนักงานทุกคนที่ไม่มีค่าคอมมิชชั่นคืออะไร?
What are the full name (first and last name) and salary for all employees who does not have any value for commission?
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary VARCHAR)
SELECT first_name, last_name, salary FROM employees WHERE first_name LIKE '%m'
แสดงชื่อและนามสกุล และเงินเดือนของพนักงานที่ชื่อลงท้ายด้วยตัวอักษร ม.
Display the first and last name, and salary for those employees whose first name is ending with the letter m.
CREATE TABLE employees (job_id VARCHAR, hire_date INTEGER)
SELECT job_id, hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'
ค้นหารหัสงานและวันที่จ้างสำหรับพนักงานที่ได้รับการว่าจ้างระหว่างวันที่ 5 พฤศจิกายน 2550 ถึง 5 กรกฎาคม 2552
Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, department_id VARCHAR)
SELECT first_name, last_name FROM employees WHERE department_id = 70 OR department_id = 90
ชื่อและนามสกุลของพนักงานที่ทำงานในแผนก 70 หรือ 90 คืออะไร
What are the first and last name for those employees who works either in department 70 or 90?
CREATE TABLE employees (salary VARCHAR, manager_id VARCHAR)
SELECT salary, manager_id FROM employees WHERE manager_id <> "null"
ค้นหาเงินเดือนและหมายเลขผู้จัดการสำหรับพนักงานที่ทำงานภายใต้ผู้จัดการ
Find the salary and manager number for those employees who is working under a manager.
CREATE TABLE employees (hire_date INTEGER)
SELECT * FROM employees WHERE hire_date < '2002-06-21'
แสดงรายละเอียดทั้งหมดจากตารางพนักงานสำหรับพนักงานที่ได้รับการว่าจ้างก่อนปี 2545-06-21
display all the details from Employees table for those employees who was hired before 2002-06-21.
CREATE TABLE employees (salary VARCHAR, first_name VARCHAR)
SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC
แสดงข้อมูลทั้งหมดสำหรับพนักงานทุกคนที่มีตัวอักษร D หรือ S อยู่ในชื่อของตน และจัดเรียงผลลัพธ์โดยเรียงลำดับตามเงินเดือนจากมากไปน้อย
display all the information for all employees who have the letters D or S in their first name and also arrange the result in descending order by salary.
CREATE TABLE employees (hire_date INTEGER)
SELECT * FROM employees WHERE hire_date > '1987-09-07'
แสดงพนักงานที่เข้าร่วมหลังวันที่ 7 กันยายน พ.ศ. 2530
display those employees who joined after 7th September, 1987.
CREATE TABLE jobs (job_title VARCHAR, min_salary INTEGER)
SELECT job_title FROM jobs WHERE min_salary > 9000
แสดงตำแหน่งงานของงานที่เงินเดือนขั้นต่ำมากกว่า 9000
display the job title of jobs which minimum salary is greater than 9000.
CREATE TABLE jobs (job_title VARCHAR, max_salary INTEGER, min_salary VARCHAR)
SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000
แสดงตำแหน่งงาน ความแตกต่างระหว่างเงินเดือนขั้นต่ำและสูงสุดสำหรับงานเหล่านั้นซึ่งเงินเดือนสูงสุดอยู่ในช่วง 12,000 ถึง 18,000
display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000.
CREATE TABLE employees (email VARCHAR, department_id VARCHAR, commission_pct VARCHAR, salary VARCHAR)
SELECT email FROM employees WHERE commission_pct = "null" AND salary BETWEEN 7000 AND 12000 AND department_id = 50
แสดงอีเมลของพนักงานที่ไม่มีเปอร์เซ็นต์ค่าคอมมิชชั่นและเงินเดือนอยู่ในช่วง 7,000 ถึง 12,000 และทำงานในแผนกนั้นซึ่งมีจำนวน 50
display the emails of the employees who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50.
CREATE TABLE job_history (employee_id VARCHAR, end_date INTEGER)
SELECT employee_id, MAX(end_date) FROM job_history GROUP BY employee_id
แสดงรหัสพนักงานของพนักงานแต่ละคนและวันที่เขาสิ้นสุดงานก่อนหน้า
display the employee ID for each employee and the date on which he ended his previous job.
CREATE TABLE employees (department_id VARCHAR, commission_pct VARCHAR)
SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10
แสดงแผนกต่างๆ ที่มีพนักงานมากกว่า 10 คนทำงานและได้รับค่าคอมมิชชันเป็นเปอร์เซ็นต์
display those departments where more than ten employees work who got a commission percentage.
CREATE TABLE employees (department_id VARCHAR, manager_id VARCHAR, employee_id VARCHAR)
SELECT DISTINCT department_id FROM employees GROUP BY department_id, manager_id HAVING COUNT(employee_id) >= 4
ค้นหารหัสของแผนกที่ผู้จัดการคนใดคนหนึ่งจัดการพนักงาน 4 คนขึ้นไป
Find the ids of the departments where any manager is managing 4 or more employees.
CREATE TABLE employees (department_id VARCHAR, salary INTEGER, commission_pct VARCHAR)
SELECT department_id, AVG(salary) FROM employees WHERE commission_pct <> "null" GROUP BY department_id
แสดงเงินเดือนเฉลี่ยของพนักงานแต่ละแผนกที่ได้รับค่าคอมมิชชันเป็นเปอร์เซ็นต์
display the average salary of employees for each department who gets a commission percentage.
CREATE TABLE locations (country_id VARCHAR)
SELECT country_id, COUNT(*) FROM locations GROUP BY country_id
แสดงรหัสประเทศและจำนวนเมืองของแต่ละประเทศ
display the country ID and number of cities for each country.
CREATE TABLE job_history (job_id VARCHAR, end_date VARCHAR, start_date VARCHAR)
SELECT job_id FROM job_history WHERE end_date - start_date > 300 GROUP BY job_id HAVING COUNT(*) >= 2
แสดงรหัสงานสำหรับงานเหล่านั้นที่ทำโดยสองคนขึ้นไปเป็นเวลานานกว่า 300 วัน
display job ID for those jobs that were done by two or more for more than 300 days.
CREATE TABLE job_history (employee_id VARCHAR)
SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2
แสดง ID สำหรับพนักงานที่เคยทำงานสองงานขึ้นไปในอดีต
display the ID for those employees who did two or more jobs in the past.
CREATE TABLE countries (country_name VARCHAR, country_id VARCHAR); CREATE TABLE departments (department_id VARCHAR, location_id VARCHAR); CREATE TABLE locations (location_id VARCHAR, country_id VARCHAR); CREATE TABLE employees (employee_id VARCHAR, department_id VARCHAR)
SELECT T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id
ค้นหาพนักงานที่มี ID และชื่อประเทศที่เขาทำงานอยู่ในปัจจุบัน
Find employee with ID and name of the country presently where (s)he is working.
CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR); CREATE TABLE employees (department_id VARCHAR)
SELECT T2.department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY T2.department_name
แสดงชื่อแผนกและจำนวนพนักงานในแต่ละแผนก
display the department name and number of employees in each of the department.
CREATE TABLE job_history (employee_id VARCHAR); CREATE TABLE employees (employee_id VARCHAR, salary VARCHAR)
SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000
คุณสามารถส่งคืนข้อมูลโดยละเอียดทั้งหมดของงานที่ทำโดยพนักงานคนใดคนหนึ่งซึ่งปัจจุบันได้รับเงินเดือนตั้งแต่ 12,000 ขึ้นไปได้หรือไม่
Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000?
CREATE TABLE jobs (job_title VARCHAR, job_id VARCHAR); CREATE TABLE employees (job_id VARCHAR)
SELECT job_title, AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id GROUP BY T2.job_title
แสดงตำแหน่งงานและเงินเดือนเฉลี่ยของพนักงาน
display job title and average salary of employees.
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary INTEGER, employee_id VARCHAR)
SELECT first_name, last_name FROM employees WHERE salary > (SELECT salary FROM employees WHERE employee_id = 163)
ชื่อเต็ม (ชื่อและนามสกุล) สำหรับพนักงานที่ได้รับเงินเดือนมากกว่าพนักงานที่มี ID 163 คืออะไร?
What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163?
CREATE TABLE employees (department_id VARCHAR, salary INTEGER)
SELECT MIN(salary), department_id FROM employees GROUP BY department_id
คืนเงินเดือนน้อยที่สุดสำหรับทุกแผนก
return the smallest salary for every departments.
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, department_id VARCHAR, salary INTEGER)
SELECT first_name, last_name, department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)
ค้นหาชื่อ นามสกุล และรหัสแผนกของพนักงานที่ได้รับเงินเดือนจำนวนดังกล่าว ซึ่งเป็นเงินเดือนที่น้อยที่สุดของแผนกต่างๆ
Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments.
CREATE TABLE employees (employee_id VARCHAR, salary INTEGER)
SELECT employee_id FROM employees WHERE salary > (SELECT AVG(salary) FROM employees)
ค้นหารหัสพนักงานสำหรับพนักงานทุกคนที่มีรายได้มากกว่าเงินเดือนโดยเฉลี่ย
Find the employee id for all employees who earn more than the average salary.
CREATE TABLE employees (employee_id VARCHAR, salary VARCHAR, manager_id VARCHAR, first_name VARCHAR)
SELECT employee_id, salary FROM employees WHERE manager_id = (SELECT employee_id FROM employees WHERE first_name = 'Payam')
แสดงรหัสพนักงานและเงินเดือนของพนักงานทุกคนที่รายงานต่อพยาม (ชื่อจริง)
display the employee id and salary of all employees who report to Payam (first name).
CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR); CREATE TABLE employees (department_id VARCHAR)
SELECT DISTINCT T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id
ค้นหาชื่อของทุกแผนกที่มีพนักงานตั้งแต่หนึ่งคนขึ้นไปที่ได้รับมอบหมายให้ทำงานจริงๆ
find the name of all departments that do actually have one or more employees assigned to them.
CREATE TABLE departments (department_id VARCHAR, manager_id VARCHAR); CREATE TABLE employees (department_id VARCHAR, employee_id VARCHAR)
SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id
รับรายละเอียดของพนักงานที่จัดการแผนก
get the details of employees who manage a department.
CREATE TABLE employees (job_id VARCHAR, salary INTEGER)
SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000
ค้นหารหัสงานสำหรับงานเหล่านั้นซึ่งมีเงินเดือนเฉลี่ยมากกว่า 8,000
Find the job ID for those jobs which average salary is above 8000.
CREATE TABLE jobs (job_title VARCHAR, job_id VARCHAR); CREATE TABLE employees (employee_id VARCHAR, job_id VARCHAR, department_id VARCHAR)
SELECT T1.employee_id, T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.department_id = 80
แสดงรหัสพนักงานและชื่องานสำหรับงานเหล่านั้นทั้งหมดในแผนก 80
display the employee ID and job name for all those jobs in department 80.
CREATE TABLE departments (department_id VARCHAR, department_name VARCHAR); CREATE TABLE employees (first_name VARCHAR, job_id VARCHAR, department_id VARCHAR)
SELECT T1.first_name, T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T2.department_name = 'Finance'
ชื่อและรหัสงานของพนักงานทุกคนในแผนกการเงินคืออะไร?
What is the first name and job id for all employees in the Finance department?
CREATE TABLE employees (salary INTEGER)
SELECT * FROM employees WHERE salary BETWEEN (SELECT MIN(salary) FROM employees) AND 2500
แสดงข้อมูลทั้งหมดของพนักงานที่มีเงินเดือนหากอยู่ในช่วงเงินเดือนขั้นต่ำและ 2,500
display all the information of the employees whose salary if within the range of smallest salary and 2500.
CREATE TABLE departments (department_id VARCHAR, manager_id INTEGER); CREATE TABLE employees (department_id VARCHAR, manager_id INTEGER)
SELECT * FROM employees WHERE NOT department_id IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)
ค้นหารหัสของพนักงานที่ไม่ได้ทำงานในแผนกเหล่านั้นซึ่งมีพนักงานบางคนทำงานซึ่งมีรหัสผู้จัดการอยู่ในช่วง 100 และ 200
Find the ids of the employees who does not work in those departments where some employees works whose manager id within the range 100 and 200.
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, department_id VARCHAR)
SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = "Clara")
แสดงชื่อพนักงาน (ชื่อและนามสกุล) และวันที่จ้างของพนักงานทุกคนในแผนกเดียวกับคลาร่า
display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR, department_id VARCHAR)
SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = "Clara") AND first_name <> "Clara"
แสดงชื่อพนักงาน (ชื่อและนามสกุล) และวันที่จ้างของพนักงานทุกคนในแผนกเดียวกับคลาร่า ยกเว้นคลาร่า
display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara.
CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, department_id VARCHAR)
SELECT employee_id, first_name, last_name FROM employees WHERE department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%T%')
แสดงหมายเลขและชื่อพนักงาน (ชื่อและนามสกุล) สำหรับพนักงานทุกคนที่ทำงานในแผนกกับพนักงานที่มีชื่อมี 'T'
display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a ’T’.
CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, salary INTEGER, department_id VARCHAR)
SELECT employee_id, first_name, last_name, salary FROM employees WHERE salary > (SELECT AVG(salary) FROM employees) AND department_id IN (SELECT department_id FROM employees WHERE first_name LIKE '%J%')
แสดงหมายเลขพนักงาน ชื่อ (ชื่อและนามสกุล) และเงินเดือนสำหรับพนักงานทุกคนที่มีรายได้มากกว่าเงินเดือนโดยเฉลี่ย และผู้ที่ทำงานในแผนกกับพนักงานที่มีตัว 'J' อยู่ในชื่อ
display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name.
CREATE TABLE employees (employee_id VARCHAR, job_id VARCHAR, salary INTEGER)
SELECT employee_id, job_id FROM employees WHERE salary < (SELECT MIN(salary) FROM employees WHERE job_id = 'MK_MAN')
แสดงหมายเลขพนักงานและรหัสงานสำหรับพนักงานทุกคนที่มีเงินเดือนน้อยกว่าเงินเดือนของพนักงานที่มีตำแหน่งงานเป็น MK_MAN
display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN.
CREATE TABLE employees (employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, job_id VARCHAR, salary INTEGER)
SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN')
แสดงหมายเลขพนักงาน ชื่อ (ชื่อและนามสกุล) และตำแหน่งงานสำหรับพนักงานทุกคนที่มีเงินเดือนมากกว่าเงินเดือนของพนักงานที่มีตำแหน่งงานเป็น PU_MAN
display the employee number, name( first name and last name ) and job title for all employees whose salary is more than any salary of those employees whose job title is PU_MAN.
CREATE TABLE employees (department_id VARCHAR, salary INTEGER)
SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2
แสดงรหัสแผนกและเงินเดือนรวมสำหรับแผนกเหล่านั้นที่มีพนักงานอย่างน้อยสองคน
display the department id and the total salary for those departments which contains at least two employees.
CREATE TABLE job_history (employee_id VARCHAR); CREATE TABLE employees (employee_id VARCHAR)
SELECT * FROM employees WHERE NOT employee_id IN (SELECT employee_id FROM job_history)
แสดงข้อมูลทั้งหมดของพนักงานที่ไม่มีงานทำในอดีต
display all the information of those employees who did not have any job in the past.
CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary INTEGER, department_id VARCHAR)
SELECT first_name, last_name, salary, department_id, MAX(salary) FROM employees GROUP BY department_id
แสดงรหัสแผนก ชื่อนามสกุล (ชื่อและนามสกุล) เงินเดือนของพนักงานที่ได้รับเงินเดือนสูงสุดในทุกแผนก
display the department ID, full name (first and last name), salary for those employees who is highest salary in every department.
CREATE TABLE departments (department_name VARCHAR, department_id VARCHAR, location_id VARCHAR); CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, department_id VARCHAR); CREATE TABLE locations (city VARCHAR, state_province VARCHAR, location_id VARCHAR)
SELECT T1.first_name, T1.last_name, T2.department_name, T3.city, T3.state_province FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id
แสดงชื่อและนามสกุล แผนก เมือง และจังหวัดของพนักงานแต่ละคน
display the first and last name, department, city, and state province for each employee.
CREATE TABLE locations (city VARCHAR, location_id VARCHAR); CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, department_id VARCHAR); CREATE TABLE departments (department_id VARCHAR, location_id VARCHAR)
SELECT T1.first_name, T1.last_name, T3.city FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T1.first_name LIKE '%z%'
แสดงชื่อพนักงานที่มีตัวอักษร z และแสดงนามสกุล, เมืองด้วย
display those employees who contain a letter z to their first name and also display their last name, city.
CREATE TABLE locations (city VARCHAR, state_province VARCHAR, location_id VARCHAR); CREATE TABLE departments (department_name VARCHAR, location_id VARCHAR)
SELECT T1.department_name, T2.city, T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id = T1.location_id
แสดงชื่อแผนก เมือง และจังหวัดของรัฐของแต่ละแผนก
display the department name, city, and state province for each department.
CREATE TABLE countries (country_name VARCHAR, country_id VARCHAR); CREATE TABLE departments (department_id VARCHAR, location_id VARCHAR); CREATE TABLE locations (location_id VARCHAR, country_id VARCHAR); CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, employee_id VARCHAR, department_id VARCHAR)
SELECT T1.first_name, T1.last_name, T1.employee_id, T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id JOIN countries AS T4 ON T3.country_id = T4.country_id
แสดงชื่อนามสกุล (ชื่อและนามสกุล) ของพนักงานพร้อมบัตรประจำตัว และชื่อประเทศที่ตนทำงานอยู่ในปัจจุบัน
display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working.
CREATE TABLE employees (department_id VARCHAR); CREATE TABLE departments (department_id VARCHAR)
SELECT department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name
แสดงชื่อแผนกและจำนวนพนักงานในแต่ละแผนก
display the department name and number of employees in each of the department.
CREATE TABLE locations (location_id VARCHAR, city VARCHAR); CREATE TABLE employees (department_id VARCHAR); CREATE TABLE departments (department_id VARCHAR, location_id VARCHAR)
SELECT first_name, last_name, salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id JOIN locations AS T3 ON T2.location_id = T3.location_id WHERE T3.city = 'London'
แสดงชื่อเต็ม (ชื่อและนามสกุล) และเงินเดือนของพนักงานที่ทำงานในแผนกใด ๆ ที่ตั้งอยู่ในลอนดอน
display the full name (first and last name), and salary of those employees who working in any department located in London.
CREATE TABLE song (song_name VARCHAR, releasedate VARCHAR)
SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1
เพลงที่ออกเมื่อปีที่แล้วชื่ออะไรคะ?
What is the name of the song that was released in the most recent year?
CREATE TABLE files (f_id VARCHAR, duration VARCHAR)
SELECT f_id FROM files ORDER BY duration DESC LIMIT 1
id ของเพลงที่ยาวที่สุดคืออะไร?
What is the id of the longest song?
CREATE TABLE song (song_name VARCHAR, languages VARCHAR)
SELECT song_name FROM song WHERE languages = "english"
ค้นหาชื่อเพลงภาษาอังกฤษทั้งหมด
Find the names of all English songs.
CREATE TABLE files (f_id VARCHAR, formats VARCHAR)
SELECT f_id FROM files WHERE formats = "mp3"
ID ของเพลงที่มีรูปแบบเป็น MP3 คืออะไร
What are the id of songs whose format is mp3.
CREATE TABLE song (artist_name VARCHAR, rating INTEGER); CREATE TABLE artist (artist_name VARCHAR, country VARCHAR)
SELECT DISTINCT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.rating > 9
ระบุชื่อและประเทศต้นทางของนักร้องทุกคนที่ผลิตเพลงที่มีเรตติ้งสูงกว่า 9
List the name and country of origin for all singers who have produced songs with rating above 9.
CREATE TABLE song (f_id VARCHAR, resolution INTEGER); CREATE TABLE files (file_size VARCHAR, formats VARCHAR, f_id VARCHAR)
SELECT DISTINCT T1.file_size, T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800
ระบุขนาดและรูปแบบของไฟล์สำหรับเพลงทั้งหมดที่มีความละเอียดต่ำกว่า 800
List the file size and format for all songs that have resolution lower than 800.
CREATE TABLE files (f_id VARCHAR, duration VARCHAR); CREATE TABLE song (artist_name VARCHAR, f_id VARCHAR)
SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1
ศิลปินที่ผลิตเพลงสั้นที่สุดชื่ออะไร
What is the name of the artist who produced the shortest song?
CREATE TABLE song (artist_name VARCHAR, rating VARCHAR); CREATE TABLE artist (artist_name VARCHAR, country VARCHAR)
SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3
ชื่อและประเทศต้นกำเนิดของศิลปินที่ผลิตเพลงยอดนิยมสามอันดับแรกคืออะไร
What are the names and countries of origin for the artists who produced the top three highly rated songs.
CREATE TABLE files (duration VARCHAR)
SELECT COUNT(*) FROM files WHERE duration LIKE "4:%"
กี่เพลงที่มีระยะเวลา 4 นาที?
How many songs have 4 minute duration?
CREATE TABLE artist (country VARCHAR)
SELECT COUNT(*) FROM artist WHERE country = "Bangladesh"
มีศิลปินจากบังคลาเทศกี่คน?
How many artists are from Bangladesh?
CREATE TABLE song (rating INTEGER, artist_name VARCHAR); CREATE TABLE artist (artist_name VARCHAR, gender VARCHAR)
SELECT AVG(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = "Female"
เรตติ้งเฉลี่ยของเพลงที่ศิลปินหญิงแต่งคือเท่าไร?
What is the average rating of songs produced by female artists?
CREATE TABLE files (formats VARCHAR)
SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1
รูปแบบไฟล์ยอดนิยมคืออะไร?
What is the most popular file format?
CREATE TABLE artist (artist_name VARCHAR, country VARCHAR, languages VARCHAR); CREATE TABLE song (artist_name VARCHAR, country VARCHAR, languages VARCHAR)
SELECT artist_name FROM artist WHERE country = "UK" INTERSECT SELECT artist_name FROM song WHERE languages = "english"
ค้นหารายชื่อศิลปินที่มาจากสหราชอาณาจักรและเคยผลิตเพลงภาษาอังกฤษ
Find the names of the artists who are from UK and have produced English songs.
CREATE TABLE song (f_id VARCHAR, formats VARCHAR, resolution INTEGER); CREATE TABLE files (f_id VARCHAR, formats VARCHAR, resolution INTEGER)
SELECT f_id FROM files WHERE formats = "mp4" INTERSECT SELECT f_id FROM song WHERE resolution < 1000
ค้นหารหัสเพลงที่มีอยู่ในรูปแบบ MP4 และมีความละเอียดต่ำกว่า 1,000
Find the id of songs that are available in mp4 format and have resolution lower than 1000.
CREATE TABLE artist (country VARCHAR, artist_name VARCHAR, gender VARCHAR); CREATE TABLE song (artist_name VARCHAR, languages VARCHAR)
SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T1.gender = "Female" AND T2.languages = "bangla"
ศิลปินที่เป็นผู้หญิงและผลิตเพลงในบางลามาจากประเทศใด?
What is the country of origin of the artist who is female and produced a song in Bangla?
CREATE TABLE files (duration INTEGER, f_id VARCHAR, formats VARCHAR); CREATE TABLE song (f_id VARCHAR, resolution VARCHAR)
SELECT AVG(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" AND T2.resolution < 800
ระยะเวลาเฉลี่ยของเพลงที่มีรูปแบบ MP3 และความละเอียดต่ำกว่า 800 คือเท่าใด
What is the average duration of songs that have mp3 format and resolution below 800?
CREATE TABLE artist (gender VARCHAR)
SELECT COUNT(*), gender FROM artist GROUP BY gender
ศิลปินแต่ละเพศมีจำนวนเท่าไร?
What is the number of artists for each gender?