db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
regional_sales
select sum(case when region = 'midwest' then 1 else 0 end) from `sales team`
Question: how many sales teams are there in the midwest? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitude, Longitude,...
how many sales teams are there in the midwest?
regional_sales
select distinct t from ( select case when orderdate > '1/1/18' then ordernumber else null end as t from `sales orders` ) where t is not null
Question: indicate order numbers with an order date after 1/1/2018. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitude,...
indicate order numbers with an order date after 1/1/2018.
regional_sales
select count(t1.`sales channel`) from `sales orders` as t1 inner join `sales team` as t2 on t2.salesteamid = t1._salesteamid where t2.region = 'midwest'
Question: how many sales channels does the sales team have in the midwest? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, La...
how many sales channels does the sales team have in the midwest?
regional_sales
select t2.`sales team` from `sales orders` as t1 inner join `sales team` as t2 on t2.salesteamid = t1._salesteamid where replace(t1.`unit price`, ',', '') = ( select replace(t1.`unit price`, ',', '') from `sales orders` as t1 inner join `sales team` as t2 on t2.salesteamid = t1._salesteamid order by replace(t1.`unit pr...
Question: which sales team has the other with the highest unit price? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitud...
which sales team has the other with the highest unit price?
regional_sales
select t2.region from `sales orders` as t1 inner join `sales team` as t2 on t2.salesteamid = t1._salesteamid where t1.`sales channel` = 'online' order by t1.`discount applied` desc limit 1
Question: which regions have online sales channels that have the most discounts? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Ty...
which regions have online sales channels that have the most discounts?
regional_sales
select t1.ordernumber, t1.orderdate from `sales orders` as t1 inner join customers as t2 on t2.customerid = t1._customerid where t2.`customer names` = 'apollo ltd' order by t1.`unit price` desc limit 1
Question: which apollo ltd customer's order number has the most expensive unit price, indicating the order date? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Na...
which apollo ltd customer's order number has the most expensive unit price, indicating the order date?
regional_sales
select distinct t1.ordernumber, t1.warehousecode from `sales orders` as t1 inner join customers as t2 on t2.customerid = t1._customerid where t2.`customer names` = 'elorac, corp'
Question: provide order number, warehouse code of customers elorac, corp. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Lat...
provide order number, warehouse code of customers elorac, corp.
regional_sales
select t from ( select distinct case when t3.`product name` = 'cocktail glasses' and t2.`sales channel` = 'online' then t1.`customer names` end as t from customers t1 inner join `sales orders` t2 on t2._customerid = t1.customerid inner join products t3 on t3.productid = t2._productid ) where t is not null
Question: name of customers who have ordered cocktail glasses by online sales channel. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, Sta...
name of customers who have ordered cocktail glasses by online sales channel.
regional_sales
select t2.storeid from `sales orders` as t1 inner join `store locations` as t2 on t2.storeid = t1._storeid where t2.state = 'arizona' order by t1.`unit price` - t1.`unit cost` desc limit 1
Question: which store in arizona has the most net profit? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitude, Longitude...
which store in arizona has the most net profit?
regional_sales
select sum(case when t3.state = 'florida' then t2.`unit price` else 0 end) - sum(case when t3.state = 'texas' then t2.`unit price` else 0 end) from products as t1 inner join `sales orders` as t2 on t2._productid = t1.productid inner join `store locations` as t3 on t3.storeid = t2._storeid where t1.`product name` = 'com...
Question: how much more is the florida store's computer product unit price than the texas store? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, Stat...
how much more is the florida store's computer product unit price than the texas store?
regional_sales
select distinct t2.`sales team` from `sales orders` as t1 inner join `sales team` as t2 on t2.salesteamid = t1._salesteamid where t2.region = 'midwest' and t1.`order quantity` > 5
Question: among sales teams in midwest region, which sales team has an order quantity greater than 5? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County,...
among sales teams in midwest region, which sales team has an order quantity greater than 5?
regional_sales
select t from ( select distinct case when t2.state = 'california' and t1.`sales channel` = 'in-store' and t1.`discount applied` = 0.2 then t2.storeid end as t from `sales orders` t1 inner join `store locations` t2 on t2.storeid = t1._storeid ) where t is not null
Question: please indicate store id in the state of california that have been applied 20% discount in store. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, C...
please indicate store id in the state of california that have been applied 20% discount in store.
regional_sales
select t1.`customer names` from customers as t1 inner join `sales orders` as t2 on t2._customerid = t1.customerid where t2.orderdate like '%/%/18' or t2.orderdate like '%/%/19' or t2.orderdate like '%/%/20' order by t2.`order quantity` desc limit 1
Question: list the name of the customer with the most number of order quantity from 2018 to 2020. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, Sta...
list the name of the customer with the most number of order quantity from 2018 to 2020.
regional_sales
select sum(case when t1.`product name` = 'candles' then t2.`order quantity` else 0 end), cast(sum(case when t1.`product name` = 'candles' then t2.`order quantity` else 0 end) as real) * 100 / sum(t2.`order quantity`) from products as t1 inner join `sales orders` as t2 on t2._productid = t1.productid inner join `store l...
Question: please indicate total order quantity of product candles and calculate the percentage of such product among all the orders. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations...
please indicate total order quantity of product candles and calculate the percentage of such product among all the orders.
regional_sales
select t from ( select distinct case when `sales team` = 'joshua bennett' then region else null end as t from `sales team` ) where t is not null
Question: which region is joshua bennet located in? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitude, Longitude, Area...
which region is joshua bennet located in?
regional_sales
select case when max(population) then storeid end from `store locations`
Question: what is the store id of the store located in the most populous county? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Ty...
what is the store id of the store located in the most populous county?
regional_sales
select sum(case when region = 'midwest' then 1 else 0 end) from `sales team`
Question: how many sales teams are there in the midwest? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitude, Longitude,...
how many sales teams are there in the midwest?
regional_sales
select case when max(`water area`) then type end from `store locations`
Question: what is the type of store located in the city with the highest amount of water area? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateC...
what is the type of store located in the city with the highest amount of water area?
regional_sales
select sum(iif(shipdate like '6/%/18' and `sales channel` = 'online', 1, 0)) from `sales orders`
Question: how many online orders were shipped during the month of june 2018? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, ...
how many online orders were shipped during the month of june 2018?
regional_sales
select `discount applied` from `sales orders` where replace(`unit price`, ',', '') = ( select replace(`unit price`, ',', '') from `sales orders` order by replace(`unit price`, ',', '') desc limit 1 ) order by replace(`unit price`, ',', '') desc limit 1
Question: how much is the discount applied to the order with the highest unit price? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State...
how much is the discount applied to the order with the highest unit price?
regional_sales
select t2.`product name` from `sales orders` as t1 inner join products as t2 on t2.productid = t1._productid order by replace(t1.`unit price`, ',', '') - replace(t1.`unit cost`, ',', '') desc limit 1
Question: what is the name of the product with the highest net profit? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitu...
what is the name of the product with the highest net profit?
regional_sales
select avg(t2.`household income`) from regions as t1 inner join `store locations` as t2 on t2.statecode = t1.statecode where t1.region = 'northeast' group by t2.state order by count(t2.storeid) desc limit 1
Question: in the northeast region, what is the average household income for each city located in the state with the highest number of stores? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store ...
in the northeast region, what is the average household income for each city located in the state with the highest number of stores?
regional_sales
select t from ( select distinct case when t2.`median income` < 30000 then t1.region end as t from regions t1 inner join `store locations` t2 on t2.statecode = t1.statecode ) where t is not null
Question: in which region can you find the stores located in the state whose median income is no more than 30,000? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City ...
in which region can you find the stores located in the state whose median income is no more than 30,000?
regional_sales
select sum(case when t1.region = 'west' and t2.`land area` < 20000000 then 1 else 0 end) from regions as t1 inner join `store locations` as t2 on t2.statecode = t1.statecode
Question: in the west, how many stores are there in the city whose land area is below 20,000,000? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, Sta...
in the west, how many stores are there in the city whose land area is below 20,000,000?
regional_sales
select `customer names` from ( select t1.`customer names`, t2.`unit price` - t2.`unit cost` as 'net profit' from customers t1 inner join `sales orders` t2 on t2._customerid = t1.customerid ) order by `net profit` desc limit 1
Question: what is the name of the customer who purchased the product with the highest net profiit? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, St...
what is the name of the customer who purchased the product with the highest net profiit?
regional_sales
select count(t1.ordernumber), t2.`sales team` from `sales orders` as t1 inner join `sales team` as t2 on t2.salesteamid = t1._salesteamid where t1.orderdate like '%/%/19' and t1.shipdate like '%/%/19' group by t2.`sales team` order by count(t1.ordernumber) desc limit 1
Question: in 2019, how many orders were shipped by the sales team with the highest number of orders in the said year? provide the name of the sales team. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Re...
in 2019, how many orders were shipped by the sales team with the highest number of orders in the said year? provide the name of the sales team.
regional_sales
select t2.`product name` from `sales orders` as t1 inner join products as t2 on t2.productid = t1._productid where t1.`order quantity` > 5 and shipdate like '5/%/19' order by replace(t1.`unit price`, ',', '') - replace(t1.`unit cost`, ',', '') asc limit 1
Question: among the products with an order quantity of no less than 5 that was shipped in the month of may 2019, what is the name of the product with the lowest net profit? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTea...
among the products with an order quantity of no less than 5 that was shipped in the month of may 2019, what is the name of the product with the lowest net profit?
regional_sales
select t2.latitude, t2.longitude from `sales orders` as t1 inner join `store locations` as t2 on t2.storeid = t1._storeid order by replace(t1.`unit price`, ',', '') - replace(t1.`unit cost`, ',', '') desc limit 3, 1
Question: what is the detailed coordinates of the store where the product with the 4th highest profit were purchased from? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreI...
what is the detailed coordinates of the store where the product with the 4th highest profit were purchased from?
regional_sales
select count(t1.ordernumber), t2.`sales team` from `sales orders` as t1 inner join `sales team` as t2 on t2.salesteamid = t1._salesteamid where t1.shipdate like '%/%/20' group by t2.`sales team` order by count(t1.ordernumber) desc limit 1
Question: how many orders were shipped by the sales team with the highest amount of shipped orders in 2020? give the name of the said sales team. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. St...
how many orders were shipped by the sales team with the highest amount of shipped orders in 2020? give the name of the said sales team.
regional_sales
select cast(count(t1.ordernumber) as real) / 3 from `sales orders` as t1 inner join `sales team` as t2 on t2.salesteamid = t1._salesteamid where (t2.`sales team` = 'carl nguyen' and shipdate like '%/%/18') or (t2.`sales team` = 'carl nguyen' and shipdate like '%/%/19') or (t2.`sales team` = 'carl nguyen' and shipdate l...
Question: between 2018 to 2020, what is the average amount of shipped orders per year under carl nguyen? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, Coun...
between 2018 to 2020, what is the average amount of shipped orders per year under carl nguyen?
regional_sales
select t1.`unit price` * t1.`discount applied`, t2.`product name` from `sales orders` as t1 inner join products as t2 on t2.productid = t1._productid order by replace(t1.`unit price`, ',', '') - replace(t1.`unit cost`, ',', '') desc limit 1
Question: what is the amount of discount applied to the product with the highest net profit and what is the name of the said product? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Location...
what is the amount of discount applied to the product with the highest net profit and what is the name of the said product?
regional_sales
select `customer names` from ( select t1.`customer names` , replace(t2.`unit price`, ',', '') * t2.`order quantity` - replace(t2.`unit price`, ',', '') * t2.`discount applied` as t from customers t1 inner join `sales orders` t2 on t2._customerid = t1.customerid ) order by t desc limit 3
Question: what are the names of the top 3 customers who paid the highest amount of price per order after discount? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City ...
what are the names of the top 3 customers who paid the highest amount of price per order after discount?
regional_sales
select `sales channel` from `sales orders` where orderdate like '1/%/20' group by `sales channel` order by count(`sales channel`) desc limit 1
Question: which sales channel was most preferred in commercializing products in january 2020 based on the number of orders placed? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -...
which sales channel was most preferred in commercializing products in january 2020 based on the number of orders placed?
regional_sales
select t from ( select distinct case when t2.ordernumber = 'so - 0005951' then t1.`product name` else null end as t from products t1 inner join `sales orders` t2 on t2._productid = t1.productid ) where t is not null
Question: name the product that was registered in the sales order 'so - 0005951'. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, T...
name the product that was registered in the sales order 'so - 0005951'.
regional_sales
select t3.`sales team`, t1.`city name` from `store locations` as t1 inner join `sales orders` as t2 on t2._storeid = t1.storeid inner join `sales team` as t3 on t3.salesteamid = t2._salesteamid where t2.ordernumber = 'so - 0001004'
Question: identify the store location and sales team who processed the sales order 'so - 0001004'. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, St...
identify the store location and sales team who processed the sales order 'so - 0001004'.
regional_sales
select t1.`customer names` from customers as t1 inner join `sales orders` as t2 on t2._customerid = t1.customerid inner join `store locations` as t3 on t3.storeid = t2._storeid where t3.`city name` = 'gilbert' and t2.procureddate like '%/%/19' order by replace(t2.`unit price`, ',', '') - replace(t2.`unit cost`, ',', ''...
Question: identify the top customer of the store located in gilbert, arizona based on net profit associated with the customer relationship in 2019. | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. ...
identify the top customer of the store located in gilbert, arizona based on net profit associated with the customer relationship in 2019.
regional_sales
select sum(case when t2.`city name` = 'chandler' and t1.orderdate like '%/%/20' then 1 else 0 end) from `sales orders` as t1 inner join `store locations` as t2 on t2.storeid = t1._storeid
Question: how many sales orders were processed by the store located in chandler in 2020? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, S...
how many sales orders were processed by the store located in chandler in 2020?
regional_sales
select avg(`household income`) from `store locations` where `city name` = 'glendale'
Question: what is the average household income of glendale? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitude, Longitu...
what is the average household income of glendale?
regional_sales
select max(`discount applied`) from `sales orders` where orderdate like '%/%/20'
Question: what was the best discount applied to sales orders in 2020? | Tables: Customers -> CustomerID, Customer Names. Products -> ProductID, Product Name. Regions -> StateCode, State, Region. Sales Team -> SalesTeamID, Sales Team, Region. Store Locations -> StoreID, City Name, County, StateCode, State, Type, Latitud...
what was the best discount applied to sales orders in 2020?
european_football_1
select count(*) from matchs where season = 2008 and awayteam = 'ebbsfleet' and ftr = 'd'
Question: what is the most consecutive games tied by ebbsfleet as an away team in the 2008 season? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what is the most consecutive games tied by ebbsfleet as an away team in the 2008 season?
european_football_1
select cast(count(case when country = 'england' then division else null end) as real) * 100 / count(division) from divisions
Question: of all the divisions in the world, what percentage of them belong to england? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
of all the divisions in the world, what percentage of them belong to england?
european_football_1
select cast(count(case when ftr = 'h' then 1 else null end) / count(hometeam) as real) * 100, cast(count(case when ftr = 'a' then 1 else null end) as real) / count(hometeam), cast(count(case when ftr = 'd' then 1 else null end) as real) / count(hometeam) from matchs where hometeam = 'cittadella'
Question: what percentage of games won, games lost and games drawn does cittadella have as a home team in total? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what percentage of games won, games lost and games drawn does cittadella have as a home team in total?
european_football_1
select awayteam from matchs where hometeam = 'caen' and season = 2010 and ftr = 'a' group by awayteam order by count(awayteam) desc limit 1
Question: of all the teams that played as a team away against caen in the 2010 season, which one has the highest winning percentage? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
of all the teams that played as a team away against caen in the 2010 season, which one has the highest winning percentage?
european_football_1
select cast(sum(case when div = 'f1' then 1 else 0 end) as real) * 100 / count(div) from matchs where date = '2005-07-30'
Question: what percentage of matches played on 2005/07/30 belong to the f1 division? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what percentage of matches played on 2005/07/30 belong to the f1 division?
european_football_1
select cast(sum(case when hometeam = 'sassuolo' or awayteam = 'sassuolo' then 1 else 0 end) as real) * 100 / count(ftr) from matchs where ftr = 'd'
Question: what percentage of all tied games did the sassuolo team play in? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what percentage of all tied games did the sassuolo team play in?
european_football_1
select cast(sum(case when ftag = 2 then 1 else 0 end) / count(ftag) as real) * 100 from matchs where season = 2017
Question: what is the percentage whereby the away team scored 2 goals during the 2017 seasons? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what is the percentage whereby the away team scored 2 goals during the 2017 seasons?
european_football_1
select t1.hometeam,t1.awayteam from matchs as t1 inner join divisions as t2 on t1.div=t2.division where t2.name = 'efl league one' and t1.div = 'e2'
Question: what is the name of all the teams that played in the efl league one division? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what is the name of all the teams that played in the efl league one division?
european_football_1
select count(distinct case when t1.fthg >= 4 then hometeam else null end) + count(distinct case when t1.ftag >= 4 then awayteam else null end) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.country = 'greece'
Question: how many teams playing in divisions in greece have ever scored 4 or more goals? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many teams playing in divisions in greece have ever scored 4 or more goals?
european_football_1
select count(t1.div) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.season = 2019 and t2.name = 'scottish championship' and t1.ftag = 2 and t1.fthg = 2
Question: how many matches played in the 2019 season of scottish championship league were ended with an equal result of 2-2? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many matches played in the 2019 season of scottish championship league were ended with an equal result of 2-2?
european_football_1
select t1.hometeam from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.country = 'scotland' and t1.fthg = 10
Question: which 2 scottish teams scored 10 goals playing as a local team and in which seasons? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
which 2 scottish teams scored 10 goals playing as a local team and in which seasons?
european_football_1
select t1.hometeam hwht , cast(count(case when t1.ftr = 'h' then 1 else null end) as real) * 100 / count(hometeam) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'laliga' and t2.country = 'spain' and t1.season = 2017
Question: from the spanish laliga division in the 2017 season, which team won the most times as a local team and by what percentage? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
from the spanish laliga division in the 2017 season, which team won the most times as a local team and by what percentage?
european_football_1
select ( select count(t1.div) as total from matchs t1 inner join divisions t2 on t2.division = t1.div where t2.country = 'england' and t1.season = 2012 ) as num , case when 1 then t.result end as percentage from ( select 100.0 * count(t1.div) / ( select count(t1.div) from matchs t1 inner join divisions t2 on t2.divisio...
Question: how many teams that played in the 2012 season belong to any of the english divisions and what percentage play in each of the divisions? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many teams that played in the 2012 season belong to any of the english divisions and what percentage play in each of the divisions?
european_football_1
select ( select max(max(ftag), max(fthg)) from matchs where season = 2021 ) as t1, awayteam from matchs where season = 2021 and fthg = t1 or ftag = t1
Question: what is the highest final-time score across all divisions in the 2021 season? which team was the team that made up that score? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what is the highest final-time score across all divisions in the 2021 season? which team was the team that made up that score?
european_football_1
select hometeam from matchs where div = 'p1' and season = 2021 order by fthg desc limit 1
Question: what is the name of the home team in division p1 with the highest final time goal in all seasons? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what is the name of the home team in division p1 with the highest final time goal in all seasons?
european_football_1
select cast(count(case when ftr = 'h' then 1 else null end) as real) * 100 / count(ftr) - cast(count(case when ftr = 'a' then 1 else null end) as real) * 100 / count(ftr) difference from matchs where season = 2010
Question: what was the difference in home team and away team win percentages across all divisions in 2010? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what was the difference in home team and away team win percentages across all divisions in 2010?
european_football_1
select div from matchs where season = 2008 and ftr = 'd' group by div order by count(ftr) desc limit 1
Question: which division had the most draft matches in the 2008 season? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
which division had the most draft matches in the 2008 season?
european_football_1
select hometeam from matchs where div = 'ec' and date = '2008-01-20' and ftr = 'h'
Question: which team won the match in the ec division on january 20, 2008 at home? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
which team won the match in the ec division on january 20, 2008 at home?
european_football_1
select t2.name from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.date = '2009-09-13' and t1.hometeam = 'club brugge' and t1.awayteam = 'genk'
Question: what is the name of the division in which club brugge and genk competed on september 13, 2009? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what is the name of the division in which club brugge and genk competed on september 13, 2009?
european_football_1
select count(t1.div) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'scottish premiership' and (t1.season between 2006 and 2008)
Question: how many matches were played in the scottish premiership division from 2006 to 2008? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many matches were played in the scottish premiership division from 2006 to 2008?
european_football_1
select distinct t2.division,t2.country from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.hometeam = 'hearts' and t1.awayteam = 'hibernian'
Question: in which division was the match between hibernian, the away team, and hearts, the home team, played? to which country does this division belong? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
in which division was the match between hibernian, the away team, and hearts, the home team, played? to which country does this division belong?
european_football_1
select t1.awayteam from matchs as t1 inner join divisions as t2 on t1.div=t2.division where t2.name = 'bundesliga' order by t1.ftag desc limit 1
Question: which away team in the division of bundesliga has the highest final time goals? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
which away team in the division of bundesliga has the highest final time goals?
european_football_1
select t1.awayteam from matchs as t1 inner join divisions as t2 on t1.div=t2.division where t2.country = 'italy' limit 3
Question: please provide the names of any three away teams that competed in the italian divisions. | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
please provide the names of any three away teams that competed in the italian divisions.
european_football_1
select t2.name from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.season = 2019 and t1.ftr = 'd' group by t2.division order by count(ftr) limit 1
Question: what is the name of the division that has had the lowest number of draft matches in the 2019 season? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what is the name of the division that has had the lowest number of draft matches in the 2019 season?
european_football_1
select count(t1.hometeam) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'laliga' and t1.hometeam = 'valencia' and t1.ftr = 'h'
Question: how many times did valencia's home team win in the laliga division? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many times did valencia's home team win in the laliga division?
european_football_1
select count(t1.ftr) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'seria a' and t1.ftr = 'd'
Question: in how many matches in the seria a division did both teams have equal goals? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
in how many matches in the seria a division did both teams have equal goals?
european_football_1
select count(division) from divisions where country = 'england'
Question: how many football divisions does england have? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many football divisions does england have?
european_football_1
select name from divisions where country = 'netherlands'
Question: what's the name of the football division in the netherlands? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what's the name of the football division in the netherlands?
european_football_1
select case when ftr = 'h' then 'east fife' else 'dumbarton' end winner from matchs where date = '2009-10-10' and hometeam = 'east fife' and awayteam = 'dumbarton'
Question: who is the winner of the game happened on 2009/10/10, between 'east fife' and 'dumbarton'? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
who is the winner of the game happened on 2009/10/10, between 'east fife' and 'dumbarton'?
european_football_1
select fthg, ftag from matchs where date = '2009-04-26' and hometeam = 'bursaspor' and awayteam = 'denizlispor'
Question: what was the final score for the game bursaspor vs denizlispor on 2009/4/26? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what was the final score for the game bursaspor vs denizlispor on 2009/4/26?
european_football_1
select min(date) from matchs where fthg + ftag > 10
Question: when did the first match that score more than 10 goals happen? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
when did the first match that score more than 10 goals happen?
european_football_1
select case when t1.ftr = 'h' then t1.hometeam else t1.awayteam end winner from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'ligue 2' order by t1.ftag + t1.fthg desc limit 1
Question: for the ligue 2 game that made the most goals, who is the winner of that game? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
for the ligue 2 game that made the most goals, who is the winner of that game?
european_football_1
select count(t1.ftr) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'laliga 2' and t1.date = '2016-03-27' and t1.ftr = 'a'
Question: how many away victories happened on 2016/3/27 in the laliga 2 division? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many away victories happened on 2016/3/27 in the laliga 2 division?
european_football_1
select count(t1.ftr) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'national league' and t1.date = '2018-08-07' and t1.ftr = 'd'
Question: how many draw games happened on 2018/8/7 for national league? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many draw games happened on 2018/8/7 for national league?
european_football_1
select t2.country from matchs as t1 inner join divisions as t2 on t1.div = t2.division group by t2.country order by sum(t1.ftag) desc limit 1
Question: which country had the game that away team made the most goals? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
which country had the game that away team made the most goals?
european_football_1
select t2.division, t2.name from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.season = 2011 and t1.fthg = 1 and t1.ftag = 8
Question: for a game had a score of 1-8 in the year of 2011, what division was that game in? give the full name of the division. | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
for a game had a score of 1-8 in the year of 2011, what division was that game in? give the full name of the division.
european_football_1
select t2.division, t2.name from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.date = '2020-02-22' and t1.ftag + t1.fthg > 5 order by t1.ftag + t1.fthg desc limit 1
Question: which division had the most games with more than 5 total field goals on 2020/2/22? give the full name of the division? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
which division had the most games with more than 5 total field goals on 2020/2/22? give the full name of the division?
european_football_1
select t2.name from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.ftag = 0 and t1.fthg = 0 group by t2.division order by count(t1.ftag) desc limit 1
Question: give the full name of the divison that had the most 0-0 games. | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
give the full name of the divison that had the most 0-0 games.
european_football_1
select count(t1.date) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'scottish league one' and t1.date = ( select date from matchs where fthg = 5 and ftag = 2 and hometeam = 'pro vercelli' and awayteam = 'pescara' )
Question: how many scottish league one games took place on the day that 'pro vercelli' and 'pescara'had a 5-2 game? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many scottish league one games took place on the day that 'pro vercelli' and 'pescara'had a 5-2 game?
european_football_1
select count(t1.div) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.country = 'greece' and t1.fthg = 5 and t1.ftag = 0
Question: list the number of games that ended up with 5-0 in greece. | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
list the number of games that ended up with 5-0 in greece.
european_football_1
select distinct t2.country from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.hometeam = 'bradford' or t1.awayteam = 'bradford'
Question: which country did bradford team belongs to? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
which country did bradford team belongs to?
european_football_1
select count(distinct t1.hometeam) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'eredivisie' and t1.season = 2008
Question: how many eredivisie teams have played in 2008? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many eredivisie teams have played in 2008?
european_football_1
select cast(count(case when t1.ftr = 'h' then 1 else null end) as real) * 100 / count(t1.ftr) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.season = 2021 and t2.name = 'bundesliga'
Question: what's the home win ratio of the bundesliga division in 2021? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what's the home win ratio of the bundesliga division in 2021?
european_football_1
select cast(count(case when t2.name = 'liga nos' then t1.div else null end) as real) * 100 / count(t1.div) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.fthg = 1 and ftag = 1
Question: for all the games ended up with 1-1, what percentage of them are from liga nos division? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
for all the games ended up with 1-1, what percentage of them are from liga nos division?
european_football_1
select count(t1.div) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.season = 2021 and t2.name = 'premier league'
Question: how many matches were held during the 2021 season's premier league? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many matches were held during the 2021 season's premier league?
european_football_1
select t1.hometeam from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.date = '2020-10-02' and t2.name = 'bundesliga'
Question: which team was the home team in the match of the bundesliga division on 2020/10/2? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
which team was the home team in the match of the bundesliga division on 2020/10/2?
european_football_1
select case when t1.ftr = 'h' then t1.hometeam when t1.ftr = 'a' then t1.awayteam end winner from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.date = '2020-10-02' and t2.name = 'bundesliga'
Question: which team won the match of the bundesliga division on 2020/10/2? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
which team won the match of the bundesliga division on 2020/10/2?
european_football_1
select t1.hometeam from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'bundesliga' and t1.ftr = 'h' group by t1.hometeam order by count(t1.ftr) desc limit 1
Question: which team has the most victories as the home team in matches of the bundesliga division? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
which team has the most victories as the home team in matches of the bundesliga division?
european_football_1
select count(t1.div) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'bundesliga' and t1.awayteam = 'werder bremen' and t1.ftr = 'a'
Question: how many times did the team werder bremen win as the away team in matches of the bundesliga division? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many times did the team werder bremen win as the away team in matches of the bundesliga division?
european_football_1
select count(t1.div) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'bundesliga' and t1.ftr = 'a' and t1.season = 2021
Question: how many matches of the bundesliga division ended with an away victory in the 2021 season? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many matches of the bundesliga division ended with an away victory in the 2021 season?
european_football_1
select count(t1.div) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'bundesliga' and t1.ftr = 'd'
Question: of the matches in all seasons of the bundesliga division, how many of them ended with a tie? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
of the matches in all seasons of the bundesliga division, how many of them ended with a tie?
european_football_1
select count(case when t2.name = 'bundesliga' then 1 else null end) - count(case when t2.name = 'premier league' then 1 else null end) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.season = 2021 and t1.ftr = 'h'
Question: how many home victories does the bundesliga division have in more or less than the premier league division in the 2021 season? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many home victories does the bundesliga division have in more or less than the premier league division in the 2021 season?
european_football_1
select distinct t1.hometeam from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.season = 2021 and t1.ftr = 'h' and t2.name = 'bundesliga'
Question: please list the home teams in the matches of the bundesliga division that ended with a home victory in the 2021 season. | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
please list the home teams in the matches of the bundesliga division that ended with a home victory in the 2021 season.
european_football_1
select case when count(case when t1.hometeam = 'augsburg' then 1 else null end) - count(case when t1.hometeam = ' mainz' then 1 else null end) > 0 then 'augsburg' else 'mainz' end from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.season = 2021 and t1.ftr = 'h'
Question: which team had more home victories in the 2021 season's matches of the bundesliga division, augsburg or mainz? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
which team had more home victories in the 2021 season's matches of the bundesliga division, augsburg or mainz?
european_football_1
select t1.hometeam from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'bundesliga' and t1.season = 2021 order by t1.fthg desc limit 1
Question: which team had the most final-time home-team goals in the 2021 season's matches of the bundesliga division? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
which team had the most final-time home-team goals in the 2021 season's matches of the bundesliga division?
european_football_1
select sum(t1.fthg) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t2.name = 'bundesliga' and t1.season = 2021
Question: how many final-time home-team goals were there in total in all the matches of the bundesliga division in the 2021 season? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
how many final-time home-team goals were there in total in all the matches of the bundesliga division in the 2021 season?
european_football_1
select cast(count(case when t1.ftr = 'h' then 1 else null end) + count(case when t1.ftr = 'a' then 1 else null end) as real) * 100 / count(t1.ftr) from matchs as t1 inner join divisions as t2 on t1.div = t2.division where t1.season = 2021 and t1.awayteam = 'club brugge' or t1.hometeam = 'club brugge'
Question: what's the winning rate of club brugge in the 2021 premier league? | Tables: divisions -> division, name, country. matchs -> Div, Date, HomeTeam, AwayTeam, FTHG, FTAG, FTR, season. | Joins: matchs.Div = divisions.division,
what's the winning rate of club brugge in the 2021 premier league?
professional_basketball
select cast(homewon as real) * 100 / won from teams
Question: among the winning game from the team, what is the percentage of the winning was home game. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID,...
among the winning game from the team, what is the percentage of the winning was home game.
professional_basketball
select name from teams where cast(lost as real) * 100 / games > 75
Question: which team(s) has greater than 75% lost among all the games played. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftOverall, tmID, firstName, lastName, s...
which team(s) has greater than 75% lost among all the games played.
professional_basketball
select t1.name, t1.won from teams as t1 inner join ( select * from teams where year = 2004 ) as t2 on t1.tmid = t2.tmid where t1.year = 2005 and t1.won > t2.won
Question: list the team name and the total wins of the team in year 2005 which has greater winning from the previous year. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelectio...
list the team name and the total wins of the team in year 2005 which has greater winning from the previous year.
professional_basketball
select name, o_pts from teams where cast((homewon - homelost) as real) * 100 / games > 80
Question: for team who has more home won than home lost more than 80%, list the team name and the offense points. | Tables: awards_players -> playerID, award, year, lgID, note, pos. coaches -> coachID, year, tmID, lgID, stint, won, lost, post_wins, post_losses. draft -> id, draftYear, draftRound, draftSelection, draftO...
for team who has more home won than home lost more than 80%, list the team name and the offense points.