context
stringlengths 27
489
| answer
stringlengths 18
557
| question_th
stringlengths 8
226
| question_en
stringlengths 12
244
|
---|---|---|---|
CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, guest_id VARCHAR); CREATE TABLE Guests (guest_id VARCHAR, gender_code VARCHAR)
|
SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = "Female"
|
แสดงวันที่เริ่มต้นและวันที่สิ้นสุดของการจองอพาร์ทเมนท์ทั้งหมดที่จองโดยผู้เข้าพักโดยมีรหัสเพศ "หญิง"
|
Show the start dates and end dates of all the apartment bookings made by guests with gender code "Female".
|
CREATE TABLE Apartment_Bookings (guest_id VARCHAR, booking_status_code VARCHAR); CREATE TABLE Guests (guest_first_name VARCHAR, guest_last_name VARCHAR, guest_id VARCHAR)
|
SELECT T2.guest_first_name, T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = "Confirmed"
|
แสดงชื่อและนามสกุลของแขกทุกคนที่จองอพาร์ทเมนท์พร้อมรหัสสถานะ "ยืนยันแล้ว"
|
Show the first names and last names of all the guests that have apartment bookings with status code "Confirmed".
|
CREATE TABLE Apartment_Facilities (facility_code VARCHAR, apt_id VARCHAR); CREATE TABLE Apartments (apt_id VARCHAR, bedroom_count INTEGER)
|
SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4
|
แสดงรหัสสิ่งอำนวยความสะดวกของอพาร์ทเมนท์ที่มีมากกว่า 4 ห้องนอน
|
Show the facility codes of apartments with more than 4 bedrooms.
|
CREATE TABLE Apartments (room_count INTEGER, apt_id VARCHAR); CREATE TABLE Apartment_Facilities (apt_id VARCHAR, facility_code VARCHAR)
|
SELECT SUM(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = "Gym"
|
แสดงจำนวนห้องทั้งหมดของอพาร์ทเมนท์ทั้งหมดด้วยรหัสสิ่งอำนวยความสะดวก "ยิม"
|
Show the total number of rooms of all apartments with facility code "Gym".
|
CREATE TABLE Apartment_Buildings (building_id VARCHAR, building_short_name VARCHAR); CREATE TABLE Apartments (room_count INTEGER, building_id VARCHAR)
|
SELECT SUM(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = "Columbus Square"
|
แสดงจำนวนห้องทั้งหมดของอพาร์ทเมนท์ในอาคารที่มีชื่อสั้นว่า "โคลัมบัสสแควร์"
|
Show the total number of rooms of the apartments in the building with short name "Columbus Square".
|
CREATE TABLE Apartment_Buildings (building_address VARCHAR, building_id VARCHAR); CREATE TABLE Apartments (building_id VARCHAR, bathroom_count INTEGER)
|
SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2
|
แสดงที่อยู่ของอาคารที่มีอพาร์ตเมนต์ที่มีห้องน้ำมากกว่า 2 ห้อง
|
Show the addresses of the buildings that have apartments with more than 2 bathrooms.
|
CREATE TABLE Apartment_Buildings (building_id VARCHAR, building_manager VARCHAR); CREATE TABLE Apartments (apt_type_code VARCHAR, apt_number VARCHAR, building_id VARCHAR)
|
SELECT T2.apt_type_code, T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = "Kyle"
|
แสดงรหัสประเภทอพาร์ทเมนต์และหมายเลขอพาร์ทเมนต์ในอาคารที่จัดการโดย "ไคล์"
|
Show the apartment type codes and apartment numbers in the buildings managed by "Kyle".
|
CREATE TABLE Apartment_Bookings (booking_status_code VARCHAR)
|
SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
|
แสดงรหัสสถานะการจองและจำนวนการจองที่เกี่ยวข้อง
|
Show the booking status code and the corresponding number of bookings.
|
CREATE TABLE Apartments (apt_number VARCHAR, room_count VARCHAR)
|
SELECT apt_number FROM Apartments ORDER BY room_count
|
ส่งกลับหมายเลขอพาร์ทเมนท์ทั้งหมดที่จัดเรียงตามจำนวนห้องโดยเรียงลำดับจากน้อยไปหามาก
|
Return all the apartment numbers sorted by the room count in ascending order.
|
CREATE TABLE Apartments (apt_number VARCHAR, bedroom_count VARCHAR)
|
SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1
|
กลับหมายเลขอพาร์ทเมนต์ที่มีจำนวนห้องนอนมากที่สุด
|
Return the apartment number with the largest number of bedrooms.
|
CREATE TABLE Apartments (apt_type_code VARCHAR)
|
SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*)
|
แสดงรหัสประเภทอพาร์ทเมนต์และจำนวนอพาร์ทเมนท์ที่เกี่ยวข้อง เรียงตามจำนวนอพาร์ทเมนท์จากน้อยไปหามาก
|
Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order.
|
CREATE TABLE Apartments (apt_type_code VARCHAR, room_count INTEGER)
|
SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY AVG(room_count) DESC LIMIT 3
|
แสดงรหัสประเภทอพาร์ตเมนต์ 3 อันดับแรก เรียงตามจำนวนห้องเฉลี่ยจากมากไปน้อย
|
Show the top 3 apartment type codes sorted by the average number of rooms in descending order.
|
CREATE TABLE Apartments (apt_type_code VARCHAR, bathroom_count VARCHAR, bedroom_count VARCHAR, room_count INTEGER)
|
SELECT apt_type_code, bathroom_count, bedroom_count FROM Apartments GROUP BY apt_type_code ORDER BY SUM(room_count) DESC LIMIT 1
|
แสดงรหัสประเภทอพาร์ทเมนต์ที่มีจำนวนห้องมากที่สุด พร้อมจำนวนห้องน้ำและจำนวนห้องนอน
|
Show the apartment type code that has the largest number of total rooms, together with the number of bathrooms and number of bedrooms.
|
CREATE TABLE Apartments (apt_type_code VARCHAR)
|
SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1
|
แสดงรหัสประเภทอพาร์ตเมนต์ที่พบบ่อยที่สุด
|
Show the most common apartment type code.
|
CREATE TABLE Apartments (apt_type_code VARCHAR, bathroom_count INTEGER)
|
SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1
|
แสดงรหัสประเภทอพาร์ตเมนต์ที่พบบ่อยที่สุดในอพาร์ตเมนต์ที่มีห้องน้ำมากกว่า 1 ห้อง
|
Show the most common apartment type code among apartments with more than 1 bathroom.
|
CREATE TABLE Apartments (apt_type_code VARCHAR, room_count INTEGER)
|
SELECT apt_type_code, MAX(room_count), MIN(room_count) FROM Apartments GROUP BY apt_type_code
|
แสดงรหัสประเภทอพาร์ตเมนต์แต่ละประเภท และจำนวนห้องสูงสุดและต่ำสุดสำหรับแต่ละประเภท
|
Show each apartment type code, and the maximum and minimum number of rooms for each type.
|
CREATE TABLE Guests (gender_code VARCHAR)
|
SELECT gender_code, COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC
|
แสดงรหัสเพศแต่ละรหัสและจำนวนแขกที่เกี่ยวข้องโดยจัดเรียงตามจำนวนจากมากไปน้อย
|
Show each gender code and the corresponding count of guests sorted by the count in descending order.
|
CREATE TABLE Apartment_Facilities (apt_id VARCHAR); CREATE TABLE Apartments (apt_id VARCHAR)
|
SELECT COUNT(*) FROM Apartments WHERE NOT apt_id IN (SELECT apt_id FROM Apartment_Facilities)
|
มีอพาร์ทเมนท์จำนวนกี่ห้องที่ไม่มีสิ่งอำนวยความสะดวกใดๆ?
|
How many apartments do not have any facility?
|
CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR); CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR)
|
SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional"
|
แสดงหมายเลขอพาร์ตเมนต์ของอพาร์ตเมนต์พร้อมการจองที่มีรหัสสถานะทั้ง "ชั่วคราว" และ "ยืนยันแล้ว"
|
Show the apartment numbers of apartments with bookings that have status code both "Provisional" and "Confirmed"
|
CREATE TABLE View_Unit_Status (apt_id VARCHAR, available_yn VARCHAR); CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR)
|
SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1
|
แสดงหมายเลขอพาร์ทเมนต์ของอพาร์ทเมนต์ที่มีสถานะห้องว่างทั้ง 0 และ 1
|
Show the apartment numbers of apartments with unit status availability of both 0 and 1.
|
CREATE TABLE game (season INTEGER)
|
SELECT COUNT(*) FROM game WHERE season > 2007
|
หลังจากฤดูกาล 2550 มีการแข่งขันกี่เกม?
|
How many games are held after season 2007?
|
CREATE TABLE game (Date VARCHAR, home_team VARCHAR)
|
SELECT Date FROM game ORDER BY home_team DESC
|
ระบุวันที่แข่งขันตามชื่อทีมเจ้าบ้านโดยเรียงลำดับจากมากไปน้อย
|
List the dates of games by the home team name in descending order.
|
CREATE TABLE game (season VARCHAR, home_team VARCHAR, away_team VARCHAR)
|
SELECT season, home_team, away_team FROM game
|
รายชื่อฤดูกาล ทีมเหย้า ทีมเยือน รวมทุกเกม
|
List the season, home team, away team of all the games.
|
CREATE TABLE stadium (home_games INTEGER)
|
SELECT MAX(home_games), MIN(home_games), AVG(home_games) FROM stadium
|
เกมเหย้าสูงสุด ต่ำสุด และเฉลี่ยแต่ละสนามที่จัดขึ้นคือเท่าใด?
|
What are the maximum, minimum and average home games each stadium held?
|
CREATE TABLE stadium (average_attendance VARCHAR, capacity_percentage INTEGER)
|
SELECT average_attendance FROM stadium WHERE capacity_percentage > 100
|
จำนวนผู้เข้าชมสนามกีฬาโดยเฉลี่ยที่มีเปอร์เซ็นต์ความจุสูงกว่า 100% เป็นเท่าใด
|
What is the average attendance of stadiums with capacity percentage higher than 100%?
|
CREATE TABLE injury_accident (player VARCHAR, number_of_matches VARCHAR, SOURCE VARCHAR, injury VARCHAR)
|
SELECT player, number_of_matches, SOURCE FROM injury_accident WHERE injury <> 'Knee problem'
|
ชื่อผู้เล่น จำนวนนัด และแหล่งข้อมูลสำหรับผู้เล่นที่ไม่ได้รับบาดเจ็บจาก 'ปัญหาเข่า' คืออะไร?
|
What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'?
|
CREATE TABLE injury_accident (game_id VARCHAR, player VARCHAR); CREATE TABLE game (season VARCHAR, id VARCHAR)
|
SELECT T1.season FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id WHERE T2.player = 'Walter Samuel'
|
ฤดูกาลของเกมที่ทำให้ผู้เล่น 'วอลเตอร์ ซามูเอล' ได้รับบาดเจ็บคือฤดูกาลใด?
|
What is the season of the game which causes the player 'Walter Samuel' to get injured?
|
CREATE TABLE game (id VARCHAR, score VARCHAR, date VARCHAR); CREATE TABLE injury_accident (game_id VARCHAR)
|
SELECT T1.id, T1.score, T1.date FROM game AS T1 JOIN injury_accident AS T2 ON T2.game_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2
|
รหัส คะแนน และวันที่ของเกมที่ทำให้เกิดอุบัติเหตุการบาดเจ็บอย่างน้อยสองครั้งคืออะไร
|
What are the ids, scores, and dates of the games which caused at least two injury accidents?
|
CREATE TABLE stadium (id VARCHAR, name VARCHAR); CREATE TABLE injury_accident (game_id VARCHAR); CREATE TABLE game (stadium_id VARCHAR, id VARCHAR)
|
SELECT T1.id, T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1
|
หมายเลขประจำตัวและชื่อสนามที่เกิดอุบัติเหตุการบาดเจ็บมากที่สุดคืออะไร?
|
What are the id and name of the stadium where the most injury accidents happened?
|
CREATE TABLE stadium (name VARCHAR, id VARCHAR); CREATE TABLE injury_accident (game_id VARCHAR, injury VARCHAR); CREATE TABLE game (season VARCHAR, stadium_id VARCHAR, id VARCHAR)
|
SELECT T1.season, T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.injury = 'Foot injury' OR T3.injury = 'Knee problem'
|
ในฤดูกาลใดและสนามใดที่ผู้เล่นคนใดได้รับบาดเจ็บจาก 'อาการบาดเจ็บที่เท้า' หรือ 'ปัญหาเข่า'?
|
In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?
|
CREATE TABLE injury_accident (SOURCE VARCHAR)
|
SELECT COUNT(DISTINCT SOURCE) FROM injury_accident
|
มีแหล่งข้อมูลเกี่ยวกับอุบัติเหตุการบาดเจ็บกี่ประเภท?
|
How many different kinds of information sources are there for injury accidents?
|
CREATE TABLE injury_accident (id VARCHAR, game_id VARCHAR); CREATE TABLE game (id VARCHAR, game_id VARCHAR)
|
SELECT COUNT(*) FROM game WHERE NOT id IN (SELECT game_id FROM injury_accident)
|
มีกี่เกมที่ไม่มีอาการบาดเจ็บ?
|
How many games are free of injury accidents?
|
CREATE TABLE injury_accident (injury VARCHAR, game_id VARCHAR); CREATE TABLE game (id VARCHAR, season INTEGER)
|
SELECT COUNT(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.season > 2010
|
อาการบาดเจ็บที่เกิดขึ้นหลังฤดูกาล 2010 มีกี่ประเภท?
|
How many distinct kinds of injuries happened after season 2010?
|
CREATE TABLE stadium (name VARCHAR, id VARCHAR); CREATE TABLE game (stadium_id VARCHAR, id VARCHAR); CREATE TABLE injury_accident (game_id VARCHAR, player VARCHAR)
|
SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Walter Samuel' INTERSECT SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Thiago Motta'
|
ระบุชื่อสนามกีฬาที่ทั้งผู้เล่น 'วอลเตอร์ ซามูเอล' และผู้เล่น 'ธิอาโก มอตต้า' ได้รับบาดเจ็บ
|
List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured.
|
CREATE TABLE stadium (name VARCHAR, average_attendance VARCHAR, total_attendance VARCHAR, id VARCHAR); CREATE TABLE stadium (name VARCHAR, average_attendance VARCHAR, total_attendance VARCHAR); CREATE TABLE game (stadium_id VARCHAR, id VARCHAR); CREATE TABLE injury_accident (game_id VARCHAR)
|
SELECT name, average_attendance, total_attendance FROM stadium EXCEPT SELECT T2.name, T2.average_attendance, T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id
|
แสดงชื่อ จำนวนผู้เข้าแข่งขันโดยเฉลี่ย จำนวนผู้เข้าแข่งขันในสนามกีฬาที่ไม่มีอุบัติเหตุเกิดขึ้น
|
Show the name, average attendance, total attendance for stadiums where no accidents happened.
|
CREATE TABLE stadium (name VARCHAR)
|
SELECT name FROM stadium WHERE name LIKE "%Bank%"
|
ชื่อสนามใดมีสตริงย่อยว่า "ธนาคาร"?
|
Which stadium name contains the substring "Bank"?
|
CREATE TABLE stadium (id VARCHAR); CREATE TABLE game (stadium_id VARCHAR)
|
SELECT T1.id, COUNT(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id
|
แต่ละสนามจัดการแข่งขันกี่เกม?
|
How many games has each stadium held?
|
CREATE TABLE game (date VARCHAR, id VARCHAR, season VARCHAR); CREATE TABLE injury_accident (player VARCHAR, game_id VARCHAR)
|
SELECT T1.date, T2.player FROM game AS T1 JOIN injury_accident AS T2 ON T1.id = T2.game_id ORDER BY T1.season DESC
|
สำหรับอุบัติเหตุการบาดเจ็บแต่ละครั้ง ให้ค้นหาวันที่แข่งขันและชื่อผู้เล่นที่ได้รับบาดเจ็บในเกม และเรียงลำดับผลลัพธ์ตามลำดับฤดูกาลของเกมจากมากไปหาน้อย
|
For each injury accident, find the date of the game and the name of the injured player in the game, and sort the results in descending order of game season.
|
CREATE TABLE League (name VARCHAR, country_id VARCHAR); CREATE TABLE Country (name VARCHAR, id VARCHAR)
|
SELECT T1.name, T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id
|
รายชื่อประเทศและลีกทั้งหมด
|
List all country and league names.
|
CREATE TABLE League (country_id VARCHAR); CREATE TABLE Country (id VARCHAR, name VARCHAR)
|
SELECT COUNT(*) FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id WHERE T1.name = "England"
|
อังกฤษมีกี่ลีกคะ?
|
How many leagues are there in England?
|
CREATE TABLE Player (weight INTEGER)
|
SELECT AVG(weight) FROM Player
|
น้ำหนักเฉลี่ยของผู้เล่นทุกคนคือเท่าไร?
|
What is the average weight of all players?
|
CREATE TABLE Player (weight INTEGER)
|
SELECT MAX(weight), MIN(weight) FROM Player
|
ความสูงสูงสุดและต่ำสุดของผู้เล่นทุกคนคือเท่าใด?
|
What is the maximum and minimum height of all players?
|
CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (overall_rating INTEGER); CREATE TABLE Player_Attributes (player_api_id VARCHAR, overall_rating INTEGER)
|
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating > (SELECT AVG(overall_rating) FROM Player_Attributes)
|
รายชื่อผู้เล่นทั้งหมดที่มีเรตติ้งโดยรวมสูงกว่าค่าเฉลี่ย
|
List all player names who have an overall rating higher than the average.
|
CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (player_api_id VARCHAR, dribbling VARCHAR); CREATE TABLE Player_Attributes (overall_rating INTEGER)
|
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling = (SELECT MAX(overall_rating) FROM Player_Attributes)
|
นักเตะที่เลี้ยงบอลเก่งที่สุดชื่ออะไร?
|
What are the names of players who have the best dribbling?
|
CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (player_api_id VARCHAR, crossing VARCHAR, preferred_foot VARCHAR)
|
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.crossing > 90 AND T2.preferred_foot = "right"
|
รายชื่อผู้เล่นทุกคนที่มีคะแนนครอสบอลสูงกว่า 90 และชอบใช้เท้าขวา
|
List the names of all players who have a crossing score higher than 90 and prefer their right foot.
|
CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (player_api_id VARCHAR, overall_rating VARCHAR, preferred_foot VARCHAR)
|
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.preferred_foot = "left" AND T2.overall_rating >= 85 AND T2.overall_rating <= 90
|
รายชื่อผู้เล่นเท้าซ้ายทั้งหมดที่มีคะแนนรวมระหว่าง 85 ถึง 90
|
List the names of all left-footed players who have overall rating between 85 and 90.
|
CREATE TABLE Player_Attributes (preferred_foot VARCHAR, overall_rating INTEGER)
|
SELECT preferred_foot, AVG(overall_rating) FROM Player_Attributes GROUP BY preferred_foot
|
เรตติ้งเฉลี่ยของผู้เล่นเท้าขวาและเท้าซ้ายคือเท่าไร?
|
What is the average rating for right-footed players and left-footed players?
|
CREATE TABLE Player_Attributes (preferred_foot VARCHAR, overall_rating INTEGER)
|
SELECT preferred_foot, COUNT(*) FROM Player_Attributes WHERE overall_rating > 80 GROUP BY preferred_foot
|
ในบรรดาผู้เล่นทั้งหมดที่มีเรตติ้งโดยรวมมากกว่า 80 มีนักเตะเท้าขวาและเท้าซ้ายกี่คน?
|
Of all players with an overall rating greater than 80, how many are right-footed and left-footed?
|
CREATE TABLE Player_Attributes (player_api_id VARCHAR, height VARCHAR, overall_rating INTEGER); CREATE TABLE Player (player_api_id VARCHAR, height VARCHAR, overall_rating INTEGER)
|
SELECT player_api_id FROM Player WHERE height >= 180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating > 85
|
ระบุรหัสผู้เล่นทั้งหมดที่มีส่วนสูงอย่างน้อย 180 ซม. และคะแนนโดยรวมสูงกว่า 85
|
List all of the player ids with a height of at least 180cm and an overall rating higher than 85.
|
CREATE TABLE Player_Attributes (player_api_id VARCHAR, preferred_foot VARCHAR, height VARCHAR); CREATE TABLE Player (player_api_id VARCHAR, preferred_foot VARCHAR, height VARCHAR)
|
SELECT player_api_id FROM Player WHERE height >= 180 AND height <= 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = "left"
|
ระบุรหัสทั้งหมดสำหรับผู้เล่นเท้าซ้ายที่มีส่วนสูงระหว่าง 180 ซม. ถึง 190 ซม.
|
List all of the ids for left-footed players with a height between 180cm and 190cm.
|
CREATE TABLE Player (player_name VARCHAR, player_api_id VARCHAR); CREATE TABLE Player_Attributes (player_api_id VARCHAR)
|
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY overall_rating DESC LIMIT 3
|
ใครคือผู้เล่น 3 อันดับแรกในแง่ของเรตติ้งโดยรวม?
|
Who are the top 3 players in terms of overall rating?
|
CREATE TABLE Player_Attributes (player_api_id VARCHAR); CREATE TABLE Player (player_name VARCHAR, birthday VARCHAR, player_api_id VARCHAR)
|
SELECT DISTINCT T1.player_name, T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY potential DESC LIMIT 5
|
รายชื่อและวันเกิดของผู้เล่นห้าอันดับแรกในแง่ของศักยภาพ
|
List the names and birthdays of the top five players in terms of potential.
|
CREATE TABLE performance (Id VARCHAR)
|
SELECT COUNT(*) FROM performance
|
มีการแสดงกี่รอบ?
|
How many performances are there?
|
CREATE TABLE performance (HOST VARCHAR, Attendance VARCHAR)
|
SELECT HOST FROM performance ORDER BY Attendance
|
รายชื่อเจ้าภาพการแสดงตามลำดับการเข้าร่วมจากน้อยไปหามาก
|
List the hosts of performances in ascending order of attendance.
|
CREATE TABLE performance (Date VARCHAR, LOCATION VARCHAR)
|
SELECT Date, LOCATION FROM performance
|
วันที่และสถานที่แสดงคือเมื่อใด?
|
What are the dates and locations of performances?
|
CREATE TABLE performance (Attendance VARCHAR, LOCATION VARCHAR)
|
SELECT Attendance FROM performance WHERE LOCATION = "TD Garden" OR LOCATION = "Bell Centre"
|
แสดงการเข้าชมการแสดง ณ สถานที่ “TD Garden” หรือ “Bell Centre”
|
Show the attendances of the performances at location "TD Garden" or "Bell Centre"
|
CREATE TABLE performance (Attendance INTEGER)
|
SELECT AVG(Attendance) FROM performance
|
จำนวนผู้เข้าร่วมการแสดงโดยเฉลี่ยคือเท่าไร?
|
What is the average number of attendees for performances?
|
CREATE TABLE performance (Date VARCHAR, Attendance VARCHAR)
|
SELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1
|
การแสดงที่มีผู้เข้าชมมากที่สุดคือวันไหน?
|
What is the date of the performance with the highest number of attendees?
|
CREATE TABLE performance (LOCATION VARCHAR)
|
SELECT LOCATION, COUNT(*) FROM performance GROUP BY LOCATION
|
แสดงสถานที่และจำนวนการแสดงในแต่ละสถานที่
|
Show different locations and the number of performances at each location.
|
CREATE TABLE performance (LOCATION VARCHAR)
|
SELECT LOCATION FROM performance GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1
|
แสดงสถานที่แสดงที่พบบ่อยที่สุด
|
Show the most common location of performances.
|
CREATE TABLE performance (LOCATION VARCHAR)
|
SELECT LOCATION FROM performance GROUP BY LOCATION HAVING COUNT(*) >= 2
|
แสดงสถานที่ที่มีการแสดงอย่างน้อยสองครั้ง
|
Show the locations that have at least two performances.
|
CREATE TABLE performance (LOCATION VARCHAR, Attendance INTEGER)
|
SELECT LOCATION FROM performance WHERE Attendance > 2000 INTERSECT SELECT LOCATION FROM performance WHERE Attendance < 1000
|
แสดงสถานที่ที่มีทั้งการแสดงที่มีผู้เข้าร่วมมากกว่า 2,000 คน และการแสดงที่มีผู้เข้าร่วมน้อยกว่า 1,000 คน
|
Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees.
|
CREATE TABLE performance (Location VARCHAR, Performance_ID VARCHAR); CREATE TABLE member (Name VARCHAR, Member_ID VARCHAR); CREATE TABLE member_attendance (Member_ID VARCHAR, Performance_ID VARCHAR)
|
SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID
|
แสดงชื่อสมาชิกและสถานที่แสดงที่เข้าร่วม
|
Show the names of members and the location of the performances they attended.
|
CREATE TABLE performance (Location VARCHAR, Performance_ID VARCHAR); CREATE TABLE member (Name VARCHAR, Member_ID VARCHAR); CREATE TABLE member_attendance (Member_ID VARCHAR, Performance_ID VARCHAR)
|
SELECT T2.Name, T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T2.Name
|
แสดงชื่อสมาชิกและสถานที่แสดงที่เข้าร่วมโดยเรียงตามตัวอักษรจากน้อยไปมาก
|
Show the names of members and the location of performances they attended in ascending alphabetical order of their names.
|
CREATE TABLE performance (Date VARCHAR, Performance_ID VARCHAR); CREATE TABLE member (Member_ID VARCHAR, Role VARCHAR); CREATE TABLE member_attendance (Member_ID VARCHAR, Performance_ID VARCHAR)
|
SELECT T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID WHERE T2.Role = "Violin"
|
แสดงวันแสดงร่วมกับสมาชิกที่มาร่วมงานซึ่งมีบทบาทเป็น "ไวโอลิน"
|
Show the dates of performances with attending members whose roles are "Violin".
|
CREATE TABLE performance (Date VARCHAR, Performance_ID VARCHAR, Attendance VARCHAR); CREATE TABLE member (Name VARCHAR, Member_ID VARCHAR); CREATE TABLE member_attendance (Member_ID VARCHAR, Performance_ID VARCHAR)
|
SELECT T2.Name, T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID ORDER BY T3.Attendance DESC
|
แสดงรายชื่อสมาชิกและวันที่เข้าร่วมการแสดงโดยเรียงลำดับจากมากไปน้อยในการเข้าร่วมการแสดง
|
Show the names of members and the dates of performances they attended in descending order of attendance of the performances.
|
CREATE TABLE member (Name VARCHAR, Member_ID VARCHAR); CREATE TABLE member_attendance (Name VARCHAR, Member_ID VARCHAR)
|
SELECT Name FROM member WHERE NOT Member_ID IN (SELECT Member_ID FROM member_attendance)
|
รายชื่อสมาชิกที่ไม่ได้เข้าร่วมการแสดงใดๆ
|
List the names of members who did not attend any performance.
|
CREATE TABLE classroom (building VARCHAR, capacity INTEGER)
|
SELECT DISTINCT building FROM classroom WHERE capacity > 50
|
ค้นหาอาคารที่มีห้องความจุมากกว่า 50 ห้อง
|
Find the buildings which have rooms with capacity more than 50.
|
CREATE TABLE classroom (building VARCHAR)
|
SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton'
|
นับจำนวนห้องที่ไม่ได้อยู่ในอาคารแลมเบอร์ตัน
|
Count the number of rooms that are not in the Lamberton building.
|
CREATE TABLE department (dept_name VARCHAR, building VARCHAR, budget INTEGER)
|
SELECT dept_name, building FROM department WHERE budget > (SELECT AVG(budget) FROM department)
|
ชื่อและอาคารของหน่วยงานที่มีงบประมาณมากกว่างบประมาณเฉลี่ยคืออะไร?
|
What is the name and building of the departments whose budget is more than the average budget?
|
CREATE TABLE classroom (building VARCHAR, room_number VARCHAR, capacity INTEGER)
|
SELECT building, room_number FROM classroom WHERE capacity BETWEEN 50 AND 100
|
ค้นหาหมายเลขห้องของห้องที่สามารถรองรับนักเรียนได้ 50 ถึง 100 คน และอาคารของห้องเหล่านั้น
|
Find the room number of the rooms which can sit 50 to 100 students and their buildings.
|
CREATE TABLE department (dept_name VARCHAR, building VARCHAR, budget VARCHAR)
|
SELECT dept_name, building FROM department ORDER BY budget DESC LIMIT 1
|
ค้นหาชื่อและอาคารหน่วยงานที่มีงบประมาณสูงสุด
|
Find the name and building of the department with the highest budget.
|
CREATE TABLE student (name VARCHAR, dept_name VARCHAR, tot_cred VARCHAR)
|
SELECT name FROM student WHERE dept_name = 'History' ORDER BY tot_cred DESC LIMIT 1
|
นักศึกษาที่มีหน่วยกิตรวมสูงสุดในภาควิชาประวัติศาสตร์ชื่ออะไร
|
What is the name of the student who has the highest total credits in the History department.
|
CREATE TABLE classroom (building VARCHAR)
|
SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton'
|
อาคารแลมเบอร์ตันมีกี่ห้อง
|
How many rooms does the Lamberton building have?
|
CREATE TABLE advisor (s_id VARCHAR)
|
SELECT COUNT(DISTINCT s_id) FROM advisor
|
นักเรียนมีที่ปรึกษากี่คน?
|
How many students have advisors?
|
CREATE TABLE course (dept_name VARCHAR)
|
SELECT COUNT(DISTINCT dept_name) FROM course
|
มีกี่แผนกที่เปิดสอน?
|
How many departments offer courses?
|
CREATE TABLE course (course_id VARCHAR, dept_name VARCHAR)
|
SELECT COUNT(DISTINCT course_id) FROM course WHERE dept_name = 'Physics'
|
ภาควิชาฟิสิกส์เปิดสอนกี่หลักสูตร?
|
How many different courses offered by Physics department?
|
CREATE TABLE prereq (course_id VARCHAR); CREATE TABLE course (title VARCHAR, course_id VARCHAR)
|
SELECT T1.title FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) = 2
|
ค้นหาชื่อหลักสูตรที่มีข้อกำหนดเบื้องต้นสองประการหรือไม่
|
Find the title of courses that have two prerequisites?
|
CREATE TABLE prereq (course_id VARCHAR); CREATE TABLE course (title VARCHAR, credits VARCHAR, dept_name VARCHAR, course_id VARCHAR)
|
SELECT T1.title, T1.credits, T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY T2.course_id HAVING COUNT(*) > 1
|
ค้นหาชื่อเรื่อง เครดิต และชื่อแผนกของหลักสูตรที่มีข้อกำหนดเบื้องต้นมากกว่าหนึ่งรายการใช่หรือไม่
|
Find the title, credit, and department name of courses that have more than one prerequisites?
|
CREATE TABLE prereq (course_id VARCHAR); CREATE TABLE course (course_id VARCHAR)
|
SELECT COUNT(*) FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)
|
มีกี่หลักสูตรที่ไม่มีข้อกำหนดเบื้องต้น?
|
How many courses that do not have prerequisite?
|
CREATE TABLE prereq (title VARCHAR, course_id VARCHAR); CREATE TABLE course (title VARCHAR, course_id VARCHAR)
|
SELECT title FROM course WHERE NOT course_id IN (SELECT course_id FROM prereq)
|
ค้นหาชื่อหลักสูตรที่ไม่มีข้อกำหนดเบื้องต้น?
|
Find the name of the courses that do not have any prerequisite?
|
CREATE TABLE teaches (id VARCHAR)
|
SELECT COUNT(DISTINCT id) FROM teaches
|
มีอาจารย์ผู้สอนที่แตกต่างกันกี่คนที่สอนหลักสูตรใดหลักสูตรหนึ่ง?
|
How many different instructors have taught some course?
|
CREATE TABLE department (budget INTEGER, dept_name VARCHAR)
|
SELECT SUM(budget) FROM department WHERE dept_name = 'Marketing' OR dept_name = 'Finance'
|
ค้นหางบประมาณรวมของฝ่ายการตลาดหรือการเงิน
|
Find the total budgets of the Marketing or Finance department.
|
CREATE TABLE instructor (dept_name VARCHAR, name VARCHAR)
|
SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'
|
ค้นหาชื่อแผนกของผู้สอนที่มีชื่อว่า 'ซอยซาลอน'
|
Find the department name of the instructor whose name contains 'Soisalon'.
|
CREATE TABLE classroom (building VARCHAR, capacity VARCHAR)
|
SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' AND capacity < 50
|
อาคาร Lamberton มีห้องพักกี่ห้องซึ่งสามารถรองรับได้น้อยกว่า 50 ห้อง
|
How many rooms whose capacity is less than 50 does the Lamberton building have?
|
CREATE TABLE department (dept_name VARCHAR, budget INTEGER)
|
SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department)
|
ค้นหาชื่อและงบประมาณของหน่วยงานที่มีงบประมาณมากกว่างบประมาณเฉลี่ย
|
Find the name and budget of departments whose budgets are more than the average budget.
|
CREATE TABLE instructor (name VARCHAR, dept_name VARCHAR, salary VARCHAR)
|
SELECT name FROM instructor WHERE dept_name = 'Statistics' ORDER BY salary LIMIT 1
|
อาจารย์ประจำภาควิชาสถิติและเงินเดือนต่ำสุดชื่ออะไรครับ?
|
what is the name of the instructor who is in Statistics department and earns the lowest salary?
|
CREATE TABLE course (title VARCHAR, dept_name VARCHAR)
|
SELECT title FROM course WHERE dept_name = 'Statistics' INTERSECT SELECT title FROM course WHERE dept_name = 'Psychology'
|
ค้นหาชื่อหลักสูตรที่เปิดสอนโดยทั้งแผนกสถิติและจิตวิทยา
|
Find the title of course that is provided by both Statistics and Psychology departments.
|
CREATE TABLE course (title VARCHAR, dept_name VARCHAR)
|
SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology'
|
ค้นหาชื่อหลักสูตรที่จัดทำโดยสถิติ แต่ไม่ใช่แผนกจิตวิทยา
|
Find the title of course that is provided by Statistics but not Psychology departments.
|
CREATE TABLE teaches (id VARCHAR, semester VARCHAR, YEAR VARCHAR)
|
SELECT id FROM teaches WHERE semester = 'Fall' AND YEAR = 2009 EXCEPT SELECT id FROM teaches WHERE semester = 'Spring' AND YEAR = 2010
|
ค้นหารหัสของผู้สอนที่สอนชั้นเรียนในฤดูใบไม้ร่วงปี 2009 แต่ไม่ใช่ในฤดูใบไม้ผลิปี 2010
|
Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010.
|
CREATE TABLE student (name VARCHAR, id VARCHAR); CREATE TABLE takes (id VARCHAR)
|
SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE YEAR = 2009 OR YEAR = 2010
|
ค้นหารายชื่อนักเรียนที่เข้าชั้นเรียนในปี พ.ศ. 2552 และ พ.ศ. 2553
|
Find the name of students who took any class in the years of 2009 and 2010.
|
CREATE TABLE course (dept_name VARCHAR)
|
SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3
|
ค้นหาชื่อ 3 หน่วยงานชั้นนำที่เปิดหลักสูตรจำนวนมากที่สุด?
|
Find the names of the top 3 departments that provide the largest amount of courses?
|
CREATE TABLE course (dept_name VARCHAR, credits INTEGER)
|
SELECT dept_name FROM course GROUP BY dept_name ORDER BY SUM(credits) DESC LIMIT 1
|
ค้นหาชื่อหน่วยงานที่ให้หน่วยกิตรวมสูงสุด?
|
Find the name of the department that offers the highest total credits?
|
CREATE TABLE course (title VARCHAR, credits VARCHAR)
|
SELECT title FROM course ORDER BY title, credits
|
รายชื่อรายวิชาทั้งหมดเรียงตามชื่อเรื่องและหน่วยกิต
|
List the names of all courses ordered by their titles and credits.
|
CREATE TABLE department (dept_name VARCHAR, budget VARCHAR)
|
SELECT dept_name FROM department ORDER BY budget LIMIT 1
|
หน่วยงานไหนมีงบประมาณน้อยที่สุด?
|
Which department has the lowest budget?
|
CREATE TABLE department (dept_name VARCHAR, building VARCHAR, budget VARCHAR)
|
SELECT dept_name, building FROM department ORDER BY budget DESC
|
รายชื่อและอาคารของทุกแผนกเรียงตามงบประมาณจากมากไปหาน้อย
|
List the names and buildings of all departments sorted by the budget from large to small.
|
CREATE TABLE instructor (name VARCHAR, salary VARCHAR)
|
SELECT name FROM instructor ORDER BY salary DESC LIMIT 1
|
อาจารย์ผู้สอนที่ได้รับเงินเดือนสูงสุดคือใคร?
|
Who is the instructor with the highest salary?
|
CREATE TABLE instructor (salary VARCHAR)
|
SELECT * FROM instructor ORDER BY salary
|
แสดงรายการข้อมูลของอาจารย์ทั้งหมดโดยเรียงลำดับตามเงินเดือนจากน้อยไปหามาก
|
List the information of all instructors ordered by their salary in ascending order.
|
CREATE TABLE student (name VARCHAR, dept_name VARCHAR, tot_cred VARCHAR)
|
SELECT name, dept_name FROM student ORDER BY tot_cred
|
ค้นหาชื่อนักศึกษาและชื่อแผนกโดยเรียงตามหน่วยกิตรวมจากน้อยไปหามาก
|
Find the name of the students and their department names sorted by their total credits in ascending order.
|
CREATE TABLE course (title VARCHAR, course_id VARCHAR); CREATE TABLE teaches (course_id VARCHAR, id VARCHAR); CREATE TABLE instructor (name VARCHAR, id VARCHAR)
|
SELECT T1.title, T3.name FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.id = T3.id WHERE YEAR = 2008 ORDER BY T1.title
|
รายชื่อรายวิชาและชื่ออาจารย์ตามลำดับตัวอักษรในปี พ.ศ. 2551
|
list in alphabetic order all course names and their instructors' names in year 2008.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.