{ "address": { "dp_tables": { "area_code": [ { "desc": "the code of the area", "is_derived": false, "name": "area_code", "norm_name": "areacode" }, { "desc": "the zip code of the area", "is_derived": false, "name": "zip_code", "norm_name": "zipcode" } ], "avoid": [ { "desc": "the zip code of the bad alias", "is_derived": false, "name": "zip_code", "norm_name": "zipcode" }, { "desc": "the bad alias", "is_derived": false, "name": "bad_alias", "norm_name": "badalias" } ], "cbsa": [ { "desc": "the office type of the officer", "is_derived": false, "name": "cbsa_type", "norm_name": "cbsatype" }, { "desc": "the code of the cbsa officer", "is_derived": false, "name": "cbsa", "norm_name": "cbsa" } ], "congress": [ { "desc": "the first name of the congress representative", "is_derived": false, "name": "first_name", "norm_name": "firstname" }, { "desc": "the representative id of congress representatives", "is_derived": false, "name": "cognress_rep_id", "norm_name": "cognressrepid" }, { "desc": "the last name of the congress representative", "is_derived": false, "name": "last_name", "norm_name": "lastname" } ], "country": [ { "desc": "the zip code of the state in the country", "is_derived": false, "name": "zip_code", "norm_name": "zipcode" }, { "desc": "the country", "is_derived": false, "name": "county", "norm_name": "county" } ], "state": [ { "desc": "the county with the highest average income per household in the state, with ties broken by the ascending order of the country", "is_derived": true, "name": "county_with_highest_average_income_per_household", "norm_name": "countywithhighestaverageincomeperhousehold", "provenance": "SELECT county, AVG(avg_income_per_household) as average_income FROM zip_data JOIN country ON zip_data.zip_code = country.zip_code AND zip_data.state = country.state GROUP BY county ORDER BY average_income DESC, county ASC LIMIT 1;", "provenance_cols": { "country": [ "county", "zip_code", "state" ], "zip_data": [ "avg_income_per_household", "zip_code", "state" ] } }, { "desc": "Set to 1 if the state has greater than 50 CBSA officers of metro type, otherwise, set to 0", "is_derived": true, "name": "greater_than_50_CBSA_metro", "norm_name": "greaterthan50cbsametro", "provenance": "SELECT s.abbreviation, CASE WHEN COUNT(c.cbsa) > 50 THEN 1 ELSE 0 END AS result FROM state s JOIN zip_data z ON s.abbreviation = z.state JOIN cbsa c ON z.cbsa = c.cbsa AND c.cbsa_type = 'metro' GROUP BY s.abbreviation", "provenance_cols": { "cbsa": [ "cbsa", "cbsa_type" ], "state": [ "abbreviation" ], "zip_data": [ "state", "cbsa" ] } }, { "desc": "Set to 1 if the state's percentage of female population is higher than the average percentage of female population across all states, otherwise, set to 0", "is_derived": true, "name": "higher_avg_female_per", "norm_name": "higheravgfemaleper", "provenance": "SELECT state, CASE WHEN (female_population * 1.0 / population_2020) > (SELECT AVG(female_population * 1.0 / population_2020) FROM zip_data) THEN 1 ELSE 0 END AS is_higher_than_average FROM zip_data", "provenance_cols": { "zip_data": [ "state", "female_population", "population_2020" ] } }, { "desc": "the name of the state", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": "the number of Asian in the state, replace NULL values with 0.", "is_derived": true, "name": "num_asian", "norm_name": "numasian", "provenance": "SELECT COALESCE(SUM(zd.asian_population), 0) AS total_asian_population FROM zip_data zd JOIN state s ON zd.state = s.abbreviation;", "provenance_cols": { "state": [ "abbreviation" ], "zip_data": [ "asian_population", "state" ] } }, { "desc": "the number of counties in the state, replace NULL values with 0.", "is_derived": true, "name": "num_counties", "norm_name": "numcounties", "provenance": "SELECT COUNT(DISTINCT COALESCE(T1.county, 0)) FROM country AS T1 JOIN state AS T2 ON T1.state = T2.name;", "provenance_cols": { "country": [ "county", "state" ], "state": [ "name" ] } }, { "desc": "the abbreviation of the state name", "is_derived": false, "name": "abbreviation", "norm_name": "abbreviation" } ], "zip_congress": [ { "desc": "the district", "is_derived": false, "name": "district", "norm_name": "district" }, { "desc": "the zip code of the district", "is_derived": false, "name": "zip_code", "norm_name": "zipcode" } ], "zip_data": [ { "desc": "the zip code of the postal point", "is_derived": false, "name": "zip_code", "norm_name": "zipcode" }, { "desc": "the average house value in the residential area", "is_derived": false, "name": "avg_house_value", "norm_name": "avghousevalue" }, { "desc": "the population of males in the residential area", "is_derived": false, "name": "male_population", "norm_name": "malepopulation" }, { "desc": "the population of females in the residential area", "is_derived": false, "name": "female_population", "norm_name": "femalepopulation" }, { "desc": "the average income per household in the residential area", "is_derived": false, "name": "avg_income_per_household", "norm_name": "avgincomeperhousehold" }, { "desc": "the number of employees in the residential area", "is_derived": false, "name": "employees", "norm_name": "employees" }, { "desc": "the female median age in the residential area", "is_derived": false, "name": "female_median_age", "norm_name": "femalemedianage" }, { "desc": "the number of the households in the residential area", "is_derived": false, "name": "households", "norm_name": "households" }, { "desc": "the median age of the residential area", "is_derived": false, "name": "median_age", "norm_name": "medianage" }, { "desc": "the city where the postal point locates", "is_derived": false, "name": "city", "norm_name": "city" }, { "desc": "the population of the residential area in 2020", "is_derived": false, "name": "population_2020", "norm_name": "population2020" } ] }, "dprs": [ "Collect data that will allow queries on geographic and demographic characteristics, including population, households, and economic information, as well as details about employment, congressional representatives and postal services, allowing for insights into various aspects of residential areas and their surroundings.", "Collect data that will allow queries on geographic and demographic characteristics, including population, income, postal services, employment, and congressional representation, allowing for insights into regional and socioeconomic trends.", "Collect data that will allow queries on geographic and demographic information. It should include details about cities, states, employment, postal information, and congressional representatives, as well as population characteristics such as age, ethnicity, and income. It should also cover geographic features like elevation, land area, and time zones, allowing for a comprehensive understanding of various regions." ], "relevant_ques_in_bird": [ "Which residential area in Arecibo county has the highest average house value? Please give its zip_code.", "Please list the numbers of males in all the residential areas in Arecibo county.", "In which county is the residential area with the highest average income per household located?", "Please list the zip_codes of all the residential areas in Huntingdon county with over 30 employees.", "Please list the bad alias of all the residential areas with a median female age of over 32.", "What is the highest gender ratio of the residential areas in Arecibo county?", "How many males are there in New Haven County's residential areas?", "Name the country with the largest number of households in a residential area.", "List 10 cities with a median age over 40. Include their zip codes and area codes.", "Provide the zip code, city, and congress representative's full names of the area which has highest population in 2020." ], "topics_from_dp_tables": [ "census data", "legislative boundaries", "congressional districts", "geographic information", "demographic data", "area codes", "regional statistics", "population data", "address information", "zip code information" ], "topics_from_dpr": [ "socioeconomic trends", "postal services information", "population characteristics", "employment statistics", "geographic information", "demographic data", "regional analysis", "congressional representation", "economic trends" ] }, "beer_factory": { "dp_tables": { "customers": [ { "desc": "Address of the customer. Concatenate the street streetaddress, city and state with a space separating them.", "is_derived": true, "name": "address", "norm_name": "address", "provenance": "SELECT CONCAT(streetaddress, ' ', city, ' ', state) AS Address FROM customers;", "provenance_cols": { "customers": [ "streetaddress", "city", "state" ] } }, { "desc": "set to 1 if the customer has purchased at least one root beer that contains artificial sweetener, otherwise, set to 0", "is_derived": true, "name": "bought_beers_contain_artificial_sweetener", "norm_name": "boughtbeerscontainartificialsweetener", "provenance": "SELECT c.customerid, CASE WHEN EXISTS ( SELECT 1 FROM transaction t JOIN rootbeer r ON t.rootbeerid = r.rootbeerid JOIN rootbeerbrand rb ON r.brandid = rb.brandid WHERE t.customerid = c.customerid AND rb.artificialsweetener = 'Yes' ) THEN 1 ELSE 0 END AS has_purchased_artificial_sweetener_root_beer FROM customers c;", "provenance_cols": { "customers": [ "customerid" ], "rootbeer": [ "rootbeerid", "brandid" ], "rootbeerbrand": [ "brandid", "artificialsweetener" ], "transaction": [ "rootbeerid", "customerid" ] } }, { "desc": "Unique identifier for the customer.", "is_derived": false, "name": "customerid", "norm_name": "customerid" }, { "desc": "Name of the customer. Concatenate the first name and last name with a space separating them.", "is_derived": true, "name": "name", "norm_name": "name", "provenance": "SELECT first || ' ' || last AS Name FROM customers;", "provenance_cols": {} }, { "desc": "Number of reviews the customer has written, replace NULL values with 0.", "is_derived": true, "name": "num_reviews", "norm_name": "numreviews", "provenance": "SELECT customerid, COUNT(brandid) AS number_of_reviews FROM rootbeerreview GROUP BY customerid;", "provenance_cols": { "rootbeerreview": [ "customerid", "brandid" ] } }, { "desc": "set to 1 if the customer has purchased at least one root beer produced by AJ Stephans Beverages, otherwise, set to 0", "is_derived": true, "name": "purchased_beer_by_ASB", "norm_name": "purchasedbeerbyasb", "provenance": "SELECT c.customerid, CASE WHEN EXISTS ( SELECT 1 FROM transaction t JOIN rootbeer r ON t.rootbeerid = r.rootbeerid JOIN rootbeerbrand b ON r.brandid = b.brandid WHERE t.customerid = c.customerid AND b.breweryname = 'AJ Stephans Beverages' ) THEN 1 ELSE 0 END AS has_purchased_aj_stephans FROM customers c;", "provenance_cols": { "customers": [ "customerid" ], "rootbeer": [ "rootbeerid", "brandid" ], "rootbeerbrand": [ "brandid", "breweryname" ], "transaction": [ "rootbeerid", "customerid" ] } }, { "desc": "the first purchase date of the customer", "is_derived": false, "name": "firstpurchasedate", "norm_name": "firstpurchasedate" } ], "rootbeer": [ { "desc": "the brand id", "is_derived": false, "name": "brandid", "norm_name": "brandid" }, { "desc": "the unique id for the root beer", "is_derived": false, "name": "rootbeerid", "norm_name": "rootbeerid" }, { "desc": "the type of the container", "is_derived": false, "name": "containertype", "norm_name": "containertype" }, { "desc": "the purchase date of the root beer", "is_derived": false, "name": "purchasedate", "norm_name": "purchasedate" } ], "rootbeerbrand": [ { "desc": "Address of the brand, contains city, state, and country with a space between each.", "is_derived": true, "name": "address", "norm_name": "address", "provenance": "SELECT city, state, country FROM rootbeerbrand;", "provenance_cols": { "rootbeerbrand": [ "city", "state", "country" ] } }, { "desc": "Average rating star of the brand.", "is_derived": true, "name": "avg_rating_star", "norm_name": "avgratingstar", "provenance": "SELECT AVG(starrating) AS average_rating FROM rootbeerreview;", "provenance_cols": { "rootbeerreview": [ "starrating" ] } }, { "desc": "Name of the brand.", "is_derived": false, "name": "brandname", "norm_name": "brandname" }, { "desc": "Unique identifier for the brand.", "is_derived": false, "name": "brandid", "norm_name": "brandid" }, { "desc": "Latitude where the brand is consumed the most with ties broken by the descending order of the latitude", "is_derived": true, "name": "latitude_consumed_most", "norm_name": "latitudeconsumedmost", "provenance": "SELECT g.latitude FROM geolocation g JOIN location l ON g.locationid = l.locationid JOIN rootbeer r ON l.locationid = r.locationid JOIN rootbeerbrand rb ON r.brandid = rb.brandid GROUP BY g.latitude ORDER BY COUNT(rb.brandid) DESC, g.latitude DESC LIMIT 1;", "provenance_cols": { "geolocation": [ "latitude", "locationid" ], "location": [ "locationid" ], "rootbeer": [ "locationid", "brandid" ], "rootbeerbrand": [ "brandid" ] } }, { "desc": "set to 1 if the brand does not advertise on Facebook and Twitter, otherwise, set to 0", "is_derived": true, "name": "not_advertise_on_Facebook_and_Twitter", "norm_name": "notadvertiseonfacebookandtwitter", "provenance": "SELECT brandid, CASE WHEN facebookpage IS NULL AND twitter IS NULL THEN 1 ELSE 0 END AS advertise FROM rootbeerbrand;", "provenance_cols": { "rootbeerbrand": [ "brandid", "facebookpage", "twitter" ] } }, { "desc": "Number of 5-star ratings the brand has received, replace NULL values with 0.", "is_derived": true, "name": "num_5_stars", "norm_name": "num5stars", "provenance": "SELECT brandid, COALESCE(SUM(CASE WHEN starrating = 5 THEN 1 ELSE 0 END), 0) AS number_of_5_star_ratings FROM rootbeerreview GROUP BY brandid", "provenance_cols": { "rootbeerreview": [ "brandid", "starrating" ] } }, { "desc": "the unit profit of the brand available to wholesalers", "is_derived": true, "name": "unit_profit", "norm_name": "unitprofit", "provenance": "SELECT T1.brandname, T1.wholesalecost, T1.currentretailprice, T1.currentretailprice - T1.wholesalecost AS unit_profit FROM rootbeerbrand T1", "provenance_cols": { "rootbeerbrand": [ "brandname", "wholesalecost", "currentretailprice" ] } }, { "desc": "the state code", "is_derived": false, "name": "state", "norm_name": "state" }, { "desc": "the brewery name", "is_derived": false, "name": "breweryname", "norm_name": "breweryname" }, { "desc": "the wholesale cost", "is_derived": false, "name": "wholesalecost", "norm_name": "wholesalecost" }, { "desc": "the current retail price", "is_derived": false, "name": "currentretailprice", "norm_name": "currentretailprice" } ], "rootbeerreview": [ { "desc": "the id of the customer", "is_derived": false, "name": "customerid", "norm_name": "customerid" }, { "desc": "the id of the brand", "is_derived": false, "name": "brandid", "norm_name": "brandid" }, { "desc": "the star rating of the root beer", "is_derived": false, "name": "starrating", "norm_name": "starrating" }, { "desc": "the specific review content", "is_derived": false, "name": "review", "norm_name": "review" }, { "desc": "the review date", "is_derived": false, "name": "reviewdate", "norm_name": "reviewdate" } ] }, "dprs": [ "Collect data that will allow queries on customer purchasing behavior and preferences for root beers, including details about the customer and their buying history. It should provide insights into the types of root beers purchased, such as those with artificial sweeteners, and customer engagement through reviews. It should also include information to understand customer demographics and behavior.", "Collect data that will allow queries on customer purchasing behavior and preferences for root beers, including details about the customer and their buying history. It should provide information on the types of root beers purchased, such as those with artificial sweeteners, and customer engagement through reviews. It should also include data to understand customer trends and preferences.", "Collect data that will allow queries on customer purchasing behavior and preferences for root beers, including details about the customer and their buying history. It should provide insights into customers' consumption of specific types of root beers and their engagement with the product through reviews." ], "relevant_ques_in_bird": [ "Find the brand Id of the root beer which has the most number of customers who gave 1-star ratings.", "What is the average number of reviews of all the root beer brands from \"CA\" State?", "Among the root beer purchased in 2014, what percentage were sold in cans?", "How many brands of bottle root beer were purchased between 4/3/2015 and 10/26/2015?", "Which of the root beer brand have the lowest purchase?", "Which brewery does the most purchased root beer in 2016 belong to?", "Which brand of root beer was highly rated by customers?", "What are the brands of the root beers that received 5-star ratings from no less than 5 customers?", "Please name any three root beer brands that have the highest market evaluation and acceptance.", "For the root beer brand which got the review with the content of \"The quintessential dessert root beer. No ice cream required.\", what is the current retail price of the root beer?", "List the brands of root beer produced by Dr Pepper Snapple Group and calculate their percentage of purchases between 2014 to 2016.", "What did the customer say in his or her review of Bulldog root beer on 7/26/2013?", "Give me the brewery and brand names of canned root beer that were purchased before 6/6/2015.", "List down the brand names of root beer that gained a 5-star rating from a customer's review in 2013. Calculate the unit profit available to wholesalers for each brand." ], "topics_from_dp_tables": [ "beverage industry", "brewery", "food and beverage", "root beer", "customer reviews", "soft drink manufacturing" ], "topics_from_dpr": [ "customer trends", "customer purchasing behavior", "buying history", "customer demographics", "customer engagement", "root beer preferences" ] }, "book_publishing_company": { "dp_tables": { "authors": [ { "desc": "state", "is_derived": false, "name": "state", "norm_name": "state" }, { "desc": "unique number identifying authors", "is_derived": false, "name": "au_id", "norm_name": "auid" }, { "desc": "contract status", "is_derived": false, "name": "contract", "norm_name": "contract" } ], "employee": [ { "desc": "id number identifying publishers", "is_derived": false, "name": "pub_id", "norm_name": "pubid" }, { "desc": "unique number identifying employees ", "is_derived": false, "name": "emp_id", "norm_name": "empid" } ], "publishers": [ { "desc": "Average year-to-date sales of the books published by the publisher.", "is_derived": true, "name": "average_ytd_sales", "norm_name": "averageytdsales", "provenance": "SELECT AVG(t.ytd_sales) FROM titles t WHERE t.pub_id = (SELECT p.pub_id FROM publishers p WHERE p.pub_name = 'publisher_name');", "provenance_cols": { "publishers": [ "pub_id", "pub_name" ], "titles": [ "ytd_sales", "pub_id" ] } }, { "desc": "The title of the book with the highest royalty published by the publisher, with ties broken by the descending order of the title.", "is_derived": true, "name": "book_has_the_highest_royalty", "norm_name": "bookhasthehighestroyalty", "provenance": "SELECT title FROM titles WHERE royalty = (SELECT MAX(royalty) FROM titles) ORDER BY title DESC;", "provenance_cols": { "titles": [ "title", "royalty" ] } }, { "desc": "Country where the publisher is located.", "is_derived": false, "name": "country", "norm_name": "country" }, { "desc": "The title of the most expensive book published by the publisher, with ties broken by the ascending order of the title.", "is_derived": true, "name": "most_expensive_book", "norm_name": "mostexpensivebook", "provenance": "SELECT title FROM titles WHERE price = (SELECT MAX(price) FROM titles) ORDER BY title ASC LIMIT 1;", "provenance_cols": { "titles": [ "title", "price" ] } }, { "desc": "The title of the book with the most year-to-date sales published by the publisher, with ties broken by the ascending order of the title.", "is_derived": true, "name": "most_ytd_sale_title", "norm_name": "mostytdsaletitle", "provenance": "SELECT title FROM titles WHERE ytd_sales = ( SELECT MAX(ytd_sales) FROM titles ) ORDER BY title ASC LIMIT 1;", "provenance_cols": { "titles": [ "title", "ytd_sales" ] } }, { "desc": "Number of titles published by the publisher in 1991, replace NULL values with 0.", "is_derived": true, "name": "number_of_titles_1991", "norm_name": "numberoftitles1991", "provenance": "SELECT COALESCE(T2.pub_name, 0) AS Publisher, COUNT(T1.title_id) AS Number_of_titles FROM titles T1 JOIN publishers T2 ON T1.pub_id = T2.pub_id WHERE STRFTIME('%Y', T1.pubdate) = '1991' GROUP BY T2.pub_name;", "provenance_cols": { "publishers": [ "pub_name", "pub_id" ], "titles": [ "title_id", "pub_id", "pubdate" ] } }, { "desc": "Unique identifier for the publisher.", "is_derived": false, "name": "pub_id", "norm_name": "pubid" }, { "desc": "Name of the publisher.", "is_derived": false, "name": "pub_name", "norm_name": "pubname" }, { "desc": "state", "is_derived": false, "name": "state", "norm_name": "state" } ], "sales": [ { "desc": "id number identifying titles", "is_derived": false, "name": "title_id", "norm_name": "titleid" }, { "desc": "quantity of sales", "is_derived": false, "name": "qty", "norm_name": "qty" }, { "desc": "payments", "is_derived": false, "name": "payterms", "norm_name": "payterms" }, { "desc": "id number identifying stores", "is_derived": false, "name": "stor_id", "norm_name": "storid" } ], "stores": [ { "desc": "state code", "is_derived": false, "name": "state", "norm_name": "state" }, { "desc": "The title of the book with the least quantity sold in the store, with ties broken by the ascending order of the title.", "is_derived": true, "name": "least_quantity_sale_title", "norm_name": "leastquantitysaletitle", "provenance": "SELECT title FROM titles WHERE ytd_sales = (SELECT MIN(ytd_sales) FROM titles) ORDER BY title ASC;", "provenance_cols": { "titles": [ "title", "ytd_sales" ] } }, { "desc": "The percentage of psychology book sold by the store", "is_derived": true, "name": "percentage_of_psychology", "norm_name": "percentageofpsychology", "provenance": "SELECT SUM(CASE WHEN t.type = 'psychology' THEN s.qty ELSE 0 END) * 100.0 / SUM(s.qty) AS psychology_book_percentage FROM sales s JOIN titles t ON s.title_id = t.title_id;", "provenance_cols": { "sales": [ "qty", "title_id" ], "titles": [ "type", "title_id" ] } }, { "desc": "The title of the book with the highest year-to-date sales in the store, with ties broken by the ascending order of the title.", "is_derived": true, "name": "title_has_highest_ytd_sales", "norm_name": "titlehashighestytdsales", "provenance": "SELECT title FROM titles WHERE ytd_sales = (SELECT MAX(ytd_sales) FROM titles) ORDER BY title ASC;", "provenance_cols": { "titles": [ "title", "ytd_sales" ] } }, { "desc": "the percentage of the quantity ordered that were on 'Net 30' payment terms", "is_derived": true, "name": "percentage_of_Net_30_payment", "norm_name": "percentageofnet30payment", "provenance": "SELECT (SUM(CASE WHEN payterms = 'Net 30' THEN 1.0 ELSE 0 END) / COUNT(*)) * 100 FROM sales;", "provenance_cols": { "sales": [ "payterms" ] } }, { "desc": "Total quantity of books sold in the store, replace NULL values with 0.", "is_derived": true, "name": "total_sales_quantity", "norm_name": "totalsalesquantity", "provenance": "SELECT COALESCE(SUM(qty), 0) AS total_quantity FROM sales;", "provenance_cols": { "sales": [ "qty" ] } }, { "desc": "Unique identifier for the store.", "is_derived": false, "name": "stor_id", "norm_name": "storid" }, { "desc": "Name of the store.", "is_derived": false, "name": "stor_name", "norm_name": "storname" } ], "titleauthor": [ { "desc": "title id", "is_derived": false, "name": "title_id", "norm_name": "titleid" }, { "desc": "author id", "is_derived": false, "name": "au_id", "norm_name": "auid" } ], "titles": [ { "desc": "Unique identifier for the title.", "is_derived": false, "name": "title_id", "norm_name": "titleid" }, { "desc": "Title of the book.", "is_derived": false, "name": "title", "norm_name": "title" }, { "desc": "Type of the title.", "is_derived": false, "name": "type", "norm_name": "type" }, { "desc": "Set to 1 if the royalty rate of the title is above the average royalty rate of all titles; otherwise, set to 0.", "is_derived": true, "name": "has_above_average_royalty_rate", "norm_name": "hasaboveaverageroyaltyrate", "provenance": "SELECT title_id, royalty, CASE WHEN royalty > (SELECT AVG(royalty) FROM titles) THEN 1 ELSE 0 END AS is_above_average FROM titles;", "provenance_cols": { "titles": [ "title_id", "royalty" ] } }, { "desc": "Set to 1 if the year-to-date sales of the title are higher than the average year-to-date sales of all titles; otherwise, set to 0.", "is_derived": true, "name": "has_ytd_sales_higher_than_average", "norm_name": "hasytdsaleshigherthanaverage", "provenance": "SELECT title_id, ytd_sales > (SELECT AVG(ytd_sales) FROM titles) AS is_higher_than_average FROM titles;", "provenance_cols": { "titles": [ "title_id", "ytd_sales" ] } }, { "desc": "Number of copies sold in stores located in California, replace NULL values with 0.", "is_derived": true, "name": "number_of_sales_in_California_stores", "norm_name": "numberofsalesincaliforniastores", "provenance": "SELECT COALESCE(SUM(s.qty), 0) FROM sales s JOIN stores st ON s.stor_id = st.stor_id WHERE st.state = 'CA';", "provenance_cols": { "sales": [ "qty", "stor_id" ], "stores": [ "stor_id", "state" ] } }, { "desc": "Quantity of the title ordered in 1992.", "is_derived": true, "name": "ordered_quantity_1992", "norm_name": "orderedquantity1992", "provenance": "SELECT SUM(s.qty) FROM sales s JOIN titles t ON s.title_id = t.title_id WHERE STRFTIME('%Y', s.ord_date) = '1992'", "provenance_cols": { "sales": [ "qty", "title_id", "ord_date" ], "titles": [ "title_id" ] } }, { "desc": "Set to 1 if the title has sold more copies than the average number of copies sold by all titles; otherwise, set to 0.", "is_derived": true, "name": "sold_more_than_average", "norm_name": "soldmorethanaverage", "provenance": "SELECT title_id, title, ytd_sales, CASE WHEN ytd_sales > (SELECT AVG(ytd_sales) FROM titles) THEN 1 ELSE 0 END AS above_average FROM titles", "provenance_cols": { "titles": [ "title_id", "title", "ytd_sales" ] } }, { "desc": "publisher id", "is_derived": false, "name": "pub_id", "norm_name": "pubid" }, { "desc": "year to date sales", "is_derived": false, "name": "ytd_sales", "norm_name": "ytdsales" }, { "desc": "price", "is_derived": false, "name": "price", "norm_name": "price" }, { "desc": "notes if any", "is_derived": false, "name": "notes", "norm_name": "notes" }, { "desc": "publication date", "is_derived": false, "name": "pubdate", "norm_name": "pubdate" } ] }, "dprs": [ "Collect data that will allow queries on book publishing and sales performance. It should include information about authors, publishers, titles, and stores, as well as sales quantities and payment terms. It should be used to evaluate sales trends, author performance, and store operations, and to identify top-selling titles and genres.", "Collect data that will allow queries on book sales and publishing information. It should include details about authors, publishers, stores, and sales performance, allowing for insights into market trends and business operations. It should also cover various aspects, such as royalty and payment terms, to support decision-making and evaluation of sales strategies.", "Collect data that will allow queries on book publishing and sales performance. It should include information about authors, publishers, titles, and stores, as well as sales quantities and payment terms. It should be used to evaluate book sales, author performance, and store operations, and to identify trends and patterns in the book publishing industry." ], "relevant_ques_in_bird": [ "State the publisher name for publisher ID 877? Calculate its average year to date sales.", "What is the price of the book that sells the best?", "Among the publishers in the USA, how many of them have published books that are over $15?", "Please give more detailed information about the first three books that sell the best.", "List the title, price and publication date for all sales with 'ON invoice' payment terms.", "List all the titles and year to date sales by author who are not on contract.", "List all titles with sales of quantity more than 20 and store located in the CA state.", "For all authors from CA who are not on contract, which title of his/hers has the most year to date sales." ], "topics_from_dp_tables": [ "authors and publishing", "book stores", "book royalties", "literary works", "book sales", "book titles", "book publishing", "publishing industry", "publishing companies" ], "topics_from_dpr": [ "book publishing industry", "book sales data", "author performance evaluation", "sales performance analysis", "market trends and insights" ] }, "books": { "dp_tables": { "author": [ { "desc": "Unique identifier for the author.", "is_derived": false, "name": "author_id", "norm_name": "authorid" }, { "desc": "Name of the author.", "is_derived": false, "name": "author_name", "norm_name": "authorname" }, { "desc": "Set to 1 if the average price of the books written by the author is over $19; otherwise, set to 0.", "is_derived": true, "name": "avg_book_price_over_19", "norm_name": "avgbookpriceover19", "provenance": "SELECT a.author_id, CASE WHEN AVG(ol.price) > 19 THEN 1 ELSE 0 END AS avg_price_over_19 FROM author a JOIN book_author ba ON a.author_id = ba.author_id JOIN book b ON ba.book_id = b.book_id JOIN order_line ol ON b.book_id = ol.book_id GROUP BY a.author_id", "provenance_cols": { "author": [ "author_id" ], "book": [ "book_id" ], "book_author": [ "author_id", "book_id" ], "order_line": [ "price", "book_id" ] } }, { "desc": "Title of the first book written by the author, with ties broken by the ascending order of the title.", "is_derived": true, "name": "first_book", "norm_name": "firstbook", "provenance": "SELECT b.title FROM book b JOIN book_author ba ON b.book_id = ba.book_id JOIN author a ON ba.author_id = a.author_id WHERE (a.author_id, b.publication_date) IN ( SELECT ba.author_id, MIN(b.publication_date) FROM book b JOIN book_author ba ON b.book_id = ba.book_id GROUP BY ba.author_id ) ORDER BY b.title ASC LIMIT 1;", "provenance_cols": { "author": [ "author_id" ], "book": [ "title", "book_id", "publication_date" ], "book_author": [ "book_id", "author_id" ] } }, { "desc": "Title of the most expensive book written by the author, with ties broken by the descending order of the title.", "is_derived": true, "name": "most_expensive_book", "norm_name": "mostexpensivebook", "provenance": "SELECT T1.title FROM book AS T1 JOIN book_author AS T2 ON T1.book_id = T2.book_id WHERE T2.author_id = ? ORDER BY (SELECT MAX(T3.price) FROM order_line AS T3 WHERE T3.book_id = T1.book_id) DESC, T1.title DESC LIMIT 1;", "provenance_cols": { "book": [ "title", "book_id" ], "book_author": [ "book_id", "author_id" ], "order_line": [ "price", "book_id" ] } }, { "desc": "the percentage of books published by the author in 1992", "is_derived": true, "name": "per_book_published_1992", "norm_name": "perbookpublished1992", "provenance": "SELECT a.author_name, CAST(SUM(CASE WHEN EXTRACT(YEAR FROM b.publication_date) = 1992 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(b.book_id) AS percentage FROM author a JOIN book_author ba ON a.author_id = ba.author_id JOIN book b ON ba.book_id = b.book_id GROUP BY a.author_name", "provenance_cols": { "author": [ "author_name", "author_id" ], "book": [ "publication_date", "book_id" ], "book_author": [ "author_id", "book_id" ] } }, { "desc": "Set to 1 if the author has written fewer total pages than the average total pages of all authors; otherwise, set to 0.", "is_derived": true, "name": "wrote_fewer_total_pages_than_the_average", "norm_name": "wrotefewertotalpagesthantheaverage", "provenance": "SELECT a.author_id, a.author_name, SUM(b.num_pages) AS total_pages, CASE WHEN SUM(b.num_pages) < (SELECT AVG(total_pages) FROM (SELECT author_id, SUM(num_pages) AS total_pages FROM book_author ba JOIN book b ON ba.book_id = b.book_id GROUP BY author_id) AS subquery) THEN 1 ELSE 0 END AS below_average FROM author a JOIN book_author ba ON a.author_id = ba.author_id JOIN book b ON ba.book_id = b.book_id GROUP BY a.author_id, a.author_name", "provenance_cols": { "author": [ "author_id", "author_name" ], "book": [ "num_pages", "num_pages", "book_id" ], "book_author": [ "author_id", "book_id", "author_id" ] } } ], "book": [ { "desc": "the id of the publisher\nMaps to publisher (publisher_id)", "is_derived": false, "name": "publisher_id", "norm_name": "publisherid" }, { "desc": "the publication date of the book", "is_derived": false, "name": "publication_date", "norm_name": "publicationdate" }, { "desc": "the unique identifier of the book", "is_derived": false, "name": "book_id", "norm_name": "bookid" }, { "desc": "the International Standard Book Number of the book", "is_derived": false, "name": "isbn13", "norm_name": "isbn13" }, { "desc": "the title of the book", "is_derived": false, "name": "title", "norm_name": "title" } ], "cust_order": [ { "desc": "the id of the customer\nMaps to customer(customer_Id)", "is_derived": false, "name": "customer_id", "norm_name": "customerid" }, { "desc": "the unique identifier of the customer order", "is_derived": false, "name": "order_id", "norm_name": "orderid" } ], "customer": [ { "desc": "Unique identifier for the customer.", "is_derived": false, "name": "customer_id", "norm_name": "customerid" }, { "desc": "Name of the customer. Concatenate the first name and last name with a space in between.", "is_derived": true, "name": "customer_name", "norm_name": "customername", "provenance": "SELECT CONCAT(first_name, ' ', last_name) AS customer_name FROM customer;", "provenance_cols": { "customer": [ "first_name", "last_name" ] } }, { "desc": "Email of the customer.", "is_derived": false, "name": "email", "norm_name": "email" }, { "desc": "Set to 1 if the customer has ordered the oldest book; otherwise, set to 0.", "is_derived": true, "name": "has_ordered_the_oldest_book", "norm_name": "hasorderedtheoldestbook", "provenance": "SELECT c.customer_id, CASE WHEN b.publication_date = (SELECT MIN(publication_date) FROM book) THEN 1 ELSE 0 END AS has_ordered_oldest_book FROM customer c JOIN cust_order co ON c.customer_id = co.customer_id JOIN order_line ol ON co.order_id = ol.order_id JOIN book b ON ol.book_id = b.book_id", "provenance_cols": { "book": [ "publication_date", "publication_date", "book_id" ], "cust_order": [ "customer_id", "order_id" ], "customer": [ "customer_id" ], "order_line": [ "order_id", "book_id" ] } }, { "desc": "Number of orders placed by the customer, replace NULL values with 0.", "is_derived": true, "name": "num_orders", "norm_name": "numorders", "provenance": "SELECT COALESCE(T1.customer_id, 0) AS customer_id, COUNT(T2.order_id) AS number_of_orders FROM customer T1 LEFT JOIN cust_order T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id", "provenance_cols": { "cust_order": [ "order_id", "customer_id" ], "customer": [ "customer_id" ] } }, { "desc": "the percentage of those books ordered by the customer whose price is over $13", "is_derived": true, "name": "per_books_over_13", "norm_name": "perbooksover13", "provenance": "SELECT CAST(SUM(CASE WHEN T1.price > 13 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM order_line T1", "provenance_cols": { "order_line": [ "price" ] } }, { "desc": "the percentage of orders placed by the customer that were shipped internationally", "is_derived": true, "name": "per_order_shipped_internationally", "norm_name": "perordershippedinternationally", "provenance": "SELECT c.customer_id, COUNT(CASE WHEN a.country_id != 1 THEN 1 ELSE NULL END) AS international_orders, COUNT(co.order_id) AS total_orders, ROUND( COUNT(CASE WHEN a.country_id != 1 THEN 1 ELSE NULL END) * 100.0 / COUNT(co.order_id), 2) AS international_order_percentage FROM customer c JOIN cust_order co ON c.customer_id = co.customer_id JOIN address a ON co.dest_address_id = a.address_id GROUP BY c.customer_id", "provenance_cols": { "address": [ "country_id", "address_id" ], "cust_order": [ "order_id", "customer_id", "dest_address_id" ], "customer": [ "customer_id" ] } }, { "desc": "the shipping method that is preferred by customers the most, with ties broken by the ascending order of the shipping method name.", "is_derived": true, "name": "preferred_shipping_method", "norm_name": "preferredshippingmethod", "provenance": "SELECT method_name FROM ( SELECT T1.method_name, COUNT(T2.order_id) as order_count FROM shipping_method AS T1 LEFT JOIN cust_order AS T2 ON T1.method_id = T2.shipping_method_id GROUP BY T1.method_name ) ORDER BY order_count DESC, method_name ASC LIMIT 1;", "provenance_cols": { "cust_order": [ "order_id", "shipping_method_id" ], "shipping_method": [ "method_name", "method_name", "method_id" ] } }, { "desc": "the first name of the customer", "is_derived": false, "name": "first_name", "norm_name": "firstname" }, { "desc": "the last name of the customer", "is_derived": false, "name": "last_name", "norm_name": "lastname" } ], "order_line": [ { "desc": "the id of the book\nMaps to book(book_id)", "is_derived": false, "name": "book_id", "norm_name": "bookid" }, { "desc": "the price of the order", "is_derived": false, "name": "price", "norm_name": "price" }, { "desc": "the id of the order\nMaps to cust_order(order_id)", "is_derived": false, "name": "order_id", "norm_name": "orderid" }, { "desc": "the unique identifier of the order line", "is_derived": false, "name": "line_id", "norm_name": "lineid" } ], "publisher": [ { "desc": "Title of the book with the most pages published by the publisher, with ties broken by the descending order of the title.", "is_derived": true, "name": "book_title_with_the_most_pages", "norm_name": "booktitlewiththemostpages", "provenance": "SELECT title FROM book WHERE (publisher_id, num_pages) IN ( SELECT publisher_id, MAX(num_pages) FROM book GROUP BY publisher_id ) ORDER BY title DESC;", "provenance_cols": { "book": [ "title", "publisher_id", "num_pages" ] } }, { "desc": "Number of books published by the publisher, replace NULL values with 0.", "is_derived": true, "name": "num_books", "norm_name": "numbooks", "provenance": "SELECT p.publisher_id, p.publisher_name, COALESCE(COUNT(b.book_id), 0) AS number_of_books FROM publisher p LEFT JOIN book b ON p.publisher_id = b.publisher_id GROUP BY p.publisher_id, p.publisher_name", "provenance_cols": { "book": [ "book_id", "publisher_id" ], "publisher": [ "publisher_id", "publisher_name" ] } }, { "desc": "Number of books with more than 70% of the average number of pages of all books, replace NULL values with 0.", "is_derived": true, "name": "num_books_pages_greater_than_70_per_of_avg", "norm_name": "numbookspagesgreaterthan70perofavg", "provenance": "SELECT COUNT(*) FROM book WHERE COALESCE(num_pages, 0) > (70/100) * (SELECT AVG(num_pages) FROM book);", "provenance_cols": { "book": [ "num_pages" ] } }, { "desc": "Percentage of books published by the publisher that are written in Japanese.", "is_derived": true, "name": "per_Japanese_books", "norm_name": "perjapanesebooks", "provenance": "SELECT p.publisher_name, COUNT(CASE WHEN bl.language_name = 'Japanese' THEN 1 ELSE NULL END) * 100.0 / COUNT(b.book_id) AS percentage_japanese_books FROM book b JOIN publisher p ON b.publisher_id = p.publisher_id JOIN book_language bl ON b.language_id = bl.language_id GROUP BY p.publisher_name", "provenance_cols": { "book": [ "book_id", "publisher_id", "language_id" ], "book_language": [ "language_name", "language_id" ], "publisher": [ "publisher_name", "publisher_id" ] } }, { "desc": "Unique identifier for the publisher.", "is_derived": false, "name": "publisher_id", "norm_name": "publisherid" }, { "desc": "Name of the publisher.", "is_derived": false, "name": "publisher_name", "norm_name": "publishername" }, { "desc": "Title of the oldest book published by the publisher, with ties broken by the ascending order of the title.", "is_derived": true, "name": "title_of_the_oldest_book", "norm_name": "titleoftheoldestbook", "provenance": "SELECT title FROM book WHERE publication_date = ( SELECT MIN(publication_date) FROM book ) ORDER BY title ASC LIMIT 1;", "provenance_cols": { "book": [ "title", "publication_date" ] } } ] }, "dprs": [ "Collect data that will allow queries on book orders, customer information, and book publication details. It should include details about customers, books, publishers, and orders, allowing for examination of book sales, customer demographics, and publication trends. It should also support insights into book popularity, customer behavior, and publisher performance.", "Collect data that will allow queries on book orders, customer information, and publisher details. It should include book attributes, customer demographics, and order specifics, allowing for examination of publishing trends, customer behavior, and sales patterns.", "Collect data that will allow queries on book orders, customer information, and publisher details. It should include data on book attributes, titles, authors, prices, and publication dates, as well as customer addresses and order status. It should also provide information on publishers, languages, and shipping methods, allowing for analysis of book sales and customer behavior." ], "relevant_ques_in_bird": [ "How many customers ordered the oldest book?", "What is the full name of the customer who ordered the most books of all time?", "Provide the ISBN and price of the book with book ID 7160.", "Provide the email of the customers that purchased books with a price range of 3 to 5 dollars.", "Calculate the total price of books ordered by customer named Lucas Wyldbore.", "What is the percentage of books that cost greater than $10 and were ordered by customer Ruthanne Vatini?", "List the email of customers that bought the book titled Switch on the Night.", "List down the ISBN of the books purchased by the customer with an email of fsier3e@ihg.com." ], "topics_from_dp_tables": [ "literary awards", "online books", "book sales", "publishing industry", "book publishing", "reader reviews", "bookstores", "ebook" ], "topics_from_dpr": [ "book publication details", "publisher performance", "customer demographics", "book sales analysis", "customer behavior" ] }, "california_schools": { "dp_tables": { "frpm": [ { "desc": "CDSCode", "is_derived": false, "name": "cdscode", "norm_name": "cdscode" }, { "desc": "School Name ", "is_derived": false, "name": "school name", "norm_name": "schoolname" }, { "desc": "Free Meal Count (K-12)", "is_derived": false, "name": "free meal count (k-12)", "norm_name": "freemealcount(k-12)" }, { "desc": "County Code ", "is_derived": false, "name": "county name", "norm_name": "countyname" }, { "desc": "District Name ", "is_derived": false, "name": "district name", "norm_name": "districtname" }, { "desc": "Charter School (Y/N)", "is_derived": false, "name": "charter school (y/n)", "norm_name": "charterschool(y/n)" }, { "desc": "Enrollment (K-12)", "is_derived": false, "name": "enrollment (k-12)", "norm_name": "enrollment(k-12)" }, { "desc": "Enrollment (Ages 5-17)", "is_derived": false, "name": "enrollment (ages 5-17)", "norm_name": "enrollment(ages5-17)" }, { "desc": "Low Grade", "is_derived": false, "name": "low grade", "norm_name": "lowgrade" } ], "schools": [ { "desc": "Unique identifier for the school.", "is_derived": false, "name": "cdscode", "norm_name": "cdscode" }, { "desc": "The county of the school.", "is_derived": false, "name": "county", "norm_name": "county" }, { "desc": "Set to 1 if the school has more than 30 differences in enrollments between K-12 and ages 5-17, otherwise, set to 0", "is_derived": true, "name": "has_more_than_30_difference_in_enrollments_between_K_12_and_ages_5_17", "norm_name": "hasmorethan30differenceinenrollmentsbetweenk12andages517", "provenance": "SELECT CASE WHEN ABS(`enrollment (k-12)` - `enrollment (ages 5-17)`) > 30 THEN 1 ELSE 0 END FROM frpm;", "provenance_cols": { "frpm": [ "enrollment (k-12)", "enrollment (ages 5-17)" ] } }, { "desc": "The percentage of eligible free meals for ages 5 to 17 of the school", "is_derived": true, "name": "percent_eligible_free_meals_for_ages_5_17", "norm_name": "percenteligiblefreemealsforages517", "provenance": "SELECT AVG(`percent (%) eligible free (ages 5-17)`) FROM frpm;", "provenance_cols": { "frpm": [ "percent (%) eligible free (ages 5-17)" ] } }, { "desc": "The percentage of eligible free meals for grades 1 through 12 of the school", "is_derived": true, "name": "percent_eligible_free_meals_for_grades_1_through_12", "norm_name": "percenteligiblefreemealsforgrades1through12", "provenance": "SELECT AVG(`percent (%) eligible free (k-12)`) as average_percent_eligible_free FROM frpm WHERE `low grade` = '1' AND `high grade` = '12'", "provenance_cols": { "frpm": [ "percent (%) eligible free (k-12)", "low grade", "high grade" ] } }, { "desc": "The excellence rate of the SAT scores of the school", "is_derived": true, "name": "SAT_excellence_rate", "norm_name": "satexcellencerate", "provenance": "SELECT SUM(CASE WHEN numtsttakr > 0 THEN numge1500 ELSE 0 END) * 1.0 / SUM(numtsttakr) AS excellence_rate FROM satscores;", "provenance_cols": { "satscores": [ "numtsttakr", "numge1500" ] } }, { "desc": "The sum of average score for all subjects of the school, replace NULL values with 0.", "is_derived": true, "name": "sum_of_average_score_for_all_subjects", "norm_name": "sumofaveragescoreforallsubjects", "provenance": "SELECT SUM(IFNULL(avgscrread + avgscrmath + avgscrwrite, 0)) / 3 FROM satscores;", "provenance_cols": { "satscores": [ "avgscrread", "avgscrmath" ] } }, { "desc": "mailstate", "is_derived": false, "name": "mailstate", "norm_name": "mailstate" }, { "desc": "This field identifies the type of virtual instruction offered by the school. Virtual instruction is instruction in which students and teachers are separated by time and/or location, and interaction occurs via computers and/or telecommunications technologies. ", "is_derived": false, "name": "virtual", "norm_name": "virtual" }, { "desc": "This field identifies a charter school. ", "is_derived": false, "name": "charter", "norm_name": "charter" }, { "desc": "Indicates the charter school funding type", "is_derived": false, "name": "fundingtype", "norm_name": "fundingtype" }, { "desc": "The date the school opened.", "is_derived": false, "name": "opendate", "norm_name": "opendate" }, { "desc": "District Ownership Code", "is_derived": false, "name": "doc", "norm_name": "doc" }, { "desc": "School", "is_derived": false, "name": "school", "norm_name": "school" }, { "desc": "City", "is_derived": false, "name": "city", "norm_name": "city" }, { "desc": "This field identifies the status of the district. ", "is_derived": false, "name": "statustype", "norm_name": "statustype" }, { "desc": "Zip", "is_derived": false, "name": "zip", "norm_name": "zip" }, { "desc": "State", "is_derived": false, "name": "state", "norm_name": "state" }, { "desc": "The angular distance (expressed in degrees) between the location of the school, district, or administrative authority and the equator measured north to south.", "is_derived": false, "name": "latitude", "norm_name": "latitude" } ] }, "dprs": [ "Collect data that will allow queries on California schools, including administrator and school information, location information, academic performance, and student demographics. It should provide insights into school characteristics, such as eligibility for free meals and enrollment differences. It should also support evaluations of school excellence and student needs.", "Collect data that will allow queries on school performance and demographics in California. It should include information about school names, locations, and administrative details, as well as metrics on student enrollment, meal eligibility, and academic achievement. It should be possible to use the data to compare and contrast schools across different counties and regions.", "Collect data that will allow queries on school performance and demographics in California. It should include information about school names, locations, and administrative details, as well as metrics on student enrollment, meal eligibility, and academic achievement. It should be used to compare and contrast schools across different counties and regions." ], "relevant_ques_in_bird": [ "What is the highest eligible free rate for K-12 students in the schools in Alameda County?", "Of the schools with a mailing state address in California, what is the ratio of the schools located in the county of Colusa against the school located in the county of Humboldt?", "Between San Diego and Santa Barbara, which county offers the most number of schools that does not offer physical building? Indicate the amount.", "What is the ratio in percentage of Santa Clara County schools that are locally funded compared to all other types of charter school funding?", "What is the monthly average number of schools that opened in Alameda County under the jurisdiction of the Elementary School District in 1980?", "Of all the schools with a mailing state address in California, how many are active in San Joaquin city?", "Please list the zip code of all the charter schools in Fresno County Office of Education.", "Consider the average difference between K-12 enrollment and 15-17 enrollment of schools that are locally funded, list the names and DOC type of schools which has a difference above this average.", "What is the total number of non-chartered schools in the county of Los Angeles with a percent (%) of eligible free meals for grades 1 through 12 that is less than 0.18%?", "In which city can you find the school in the state of California with the lowest latitude coordinates and what is its lowest grade? Indicate the school name." ], "topics_from_dp_tables": [ "school enrollment", "school funding", "public schools", "charter schools", "school districts", "education", "california schools", "student performance", "school demographics" ], "topics_from_dpr": [ "academic achievement", "school administrative data", "student demographics", "school performance metrics", "educational excellence evaluation", "geographic location of schools" ] }, "car_retails": { "dp_tables": { "customers": [ { "desc": "Name of the customer.", "is_derived": false, "name": "customername", "norm_name": "customername" }, { "desc": "Country where the customer is located.", "is_derived": false, "name": "country", "norm_name": "country" }, { "desc": "Unique identifier for the customer.", "is_derived": false, "name": "customernumber", "norm_name": "customernumber" }, { "desc": "Set to 1 if the credit limit of the customer is not more than $100,000; otherwise, set to 0.", "is_derived": true, "name": "has_credit_limit_not_more_than_100000", "norm_name": "hascreditlimitnotmorethan100000", "provenance": "SELECT CASE WHEN creditlimit <= 100000 THEN 1 ELSE 0 END FROM customers;", "provenance_cols": { "customers": [ "creditlimit" ] } }, { "desc": "Set to 1 if the customer has made more than three payments in 2003; otherwise, set to 0.", "is_derived": true, "name": "has_paid_more_than_three_times_in_2003", "norm_name": "haspaidmorethanthreetimesin2003", "provenance": "SELECT p.customernumber, CASE WHEN COUNT(p.paymentdate) > 3 THEN 1 ELSE 0 END AS result FROM payments p WHERE STRFTIME('%Y', p.paymentdate) = '2003' GROUP BY p.customernumber;", "provenance_cols": { "payments": [ "customernumber", "paymentdate" ] } }, { "desc": "Total actual profit gained from the customer, replace NULL values with 0.", "is_derived": true, "name": "total_actual_profit_gained", "norm_name": "totalactualprofitgained", "provenance": "SELECT COALESCE(SUM(od.quantityordered * od.priceeach - p.buyprice * od.quantityordered), 0) AS total_profit FROM orderdetails od JOIN products p ON od.productcode = p.productcode JOIN orders o ON od.ordernumber = o.ordernumber JOIN customers c ON o.customernumber = c.customernumber", "provenance_cols": { "customers": [ "customernumber" ], "orderdetails": [ "quantityordered", "priceeach", "productcode", "ordernumber" ], "orders": [ "ordernumber", "customernumber" ], "products": [ "buyprice", "productcode" ] } }, { "desc": "Total payments made by the customer in 2003, replace NULL values with 0.", "is_derived": true, "name": "total_payments_2003", "norm_name": "totalpayments2003", "provenance": "SELECT COALESCE(SUM(amount), 0) AS total_payments FROM payments WHERE STRFTIME('%Y', paymentdate) = '2003';", "provenance_cols": { "payments": [ "amount", "paymentdate" ] } }, { "desc": "Total price of products shipped to the customer in 2003, replace NULL values with 0.", "is_derived": true, "name": "total_price_of_product_shipped_in_2003", "norm_name": "totalpriceofproductshippedin2003", "provenance": "SELECT COALESCE(SUM(od.quantityordered * od.priceeach), 0) FROM orderdetails od JOIN orders o ON od.ordernumber = o.ordernumber WHERE STRFTIME('%Y', o.shippeddate) = '2003'", "provenance_cols": { "orderdetails": [ "quantityordered", "priceeach", "ordernumber" ], "orders": [ "ordernumber", "shippeddate" ] } }, { "desc": "sales representative employee number", "is_derived": false, "name": "salesrepemployeenumber", "norm_name": "salesrepemployeenumber" }, { "desc": "phone", "is_derived": false, "name": "phone", "norm_name": "phone" }, { "desc": "addressLine1", "is_derived": false, "name": "addressline1", "norm_name": "addressline1" }, { "desc": "addressLine2", "is_derived": false, "name": "addressline2", "norm_name": "addressline2" } ], "employees": [ { "desc": "Unique identifier for the employee.", "is_derived": false, "name": "employeenumber", "norm_name": "employeenumber" }, { "desc": "Name of the customer who made the highest payment to the employee, with ties broken by the descending order of the customer name.", "is_derived": true, "name": "customer_made_highest_payment", "norm_name": "customermadehighestpayment", "provenance": "SELECT T.customername FROM ( SELECT c.customername, SUM(p.amount) as total_amount FROM customers c JOIN payments p ON c.customernumber = p.customernumber GROUP BY c.customername ) T ORDER BY T.total_amount DESC, T.customername DESC LIMIT 1;", "provenance_cols": { "customers": [ "customername", "customernumber" ], "payments": [ "amount", "customernumber" ] } }, { "desc": "The highest credit limit among the customers the employee is responsible for.", "is_derived": true, "name": "highest_customer_credit_limit", "norm_name": "highestcustomercreditlimit", "provenance": "SELECT MAX(c.creditlimit) FROM customers c JOIN employees e ON c.salesrepemployeenumber = e.employeenumber;", "provenance_cols": { "customers": [ "creditlimit", "salesrepemployeenumber" ], "employees": [ "employeenumber" ] } }, { "desc": "Set to 1 if the employee is located in Sydney; otherwise, set to 0.", "is_derived": true, "name": "is_in_Sydney", "norm_name": "isinsydney", "provenance": "SELECT e.employeenumber, CASE WHEN o.city = 'Sydney' THEN 1 ELSE 0 END AS is_sydney FROM employees e JOIN offices o ON e.officecode = o.officecode;", "provenance_cols": { "employees": [ "employeenumber", "officecode" ], "offices": [ "city", "officecode" ] } }, { "desc": "The name of the employee, formed by concatenating the first name and last name with a space in between.", "is_derived": true, "name": "name", "norm_name": "name", "provenance": "SELECT CONCAT(firstname, ' ', lastname) AS employee_name FROM employees;", "provenance_cols": { "employees": [ "firstname", "lastname" ] } }, { "desc": "Number of customers the employee is responsible for, replace NULL values with 0.", "is_derived": true, "name": "number_of_customers", "norm_name": "numberofcustomers", "provenance": "SELECT e.employeenumber, COUNT(c.customernumber) AS num_customers FROM employees e LEFT JOIN customers c ON e.employeenumber = c.salesrepemployeenumber GROUP BY e.employeenumber", "provenance_cols": { "customers": [ "customernumber", "salesrepemployeenumber" ], "employees": [ "employeenumber" ] } }, { "desc": "Office code where the employee is located.", "is_derived": false, "name": "officecode", "norm_name": "officecode" }, { "desc": "Name of the product with the highest amount of order made by the employee, with ties broken by the ascending order of the product name.", "is_derived": true, "name": "product_name_of_the_highest_amount_of_order", "norm_name": "productnameofthehighestamountoforder", "provenance": "SELECT T1.productname FROM products AS T1 JOIN orderdetails AS T2 ON T1.productcode = T2.productcode JOIN orders AS T3 ON T2.ordernumber = T3.ordernumber JOIN customers AS T4 ON T3.customernumber = T4.customernumber JOIN employees AS T5 ON T4.salesrepemployeenumber = T5.employeenumber GROUP BY T1.productname ORDER BY SUM(T2.quantityordered) DESC, T1.productname ASC LIMIT 1;", "provenance_cols": { "customers": [ "customernumber", "salesrepemployeenumber" ], "employees": [ "employeenumber" ], "orderdetails": [ "productcode", "ordernumber", "quantityordered" ], "orders": [ "ordernumber", "customernumber" ], "products": [ "productname", "productcode" ] } }, { "desc": "last name of employees", "is_derived": false, "name": "lastname", "norm_name": "lastname" }, { "desc": "first name of employees", "is_derived": false, "name": "firstname", "norm_name": "firstname" }, { "desc": "represents for organization structure such as who reports to whom", "is_derived": false, "name": "reportsto", "norm_name": "reportsto" }, { "desc": "job title", "is_derived": false, "name": "jobtitle", "norm_name": "jobtitle" } ], "offices": [ { "desc": "country", "is_derived": false, "name": "country", "norm_name": "country" }, { "desc": "unique ID of the office", "is_derived": false, "name": "officecode", "norm_name": "officecode" } ], "orderdetails": [ { "desc": "product code", "is_derived": false, "name": "productcode", "norm_name": "productcode" }, { "desc": "order number", "is_derived": false, "name": "ordernumber", "norm_name": "ordernumber" }, { "desc": "price for each", "is_derived": false, "name": "priceeach", "norm_name": "priceeach" }, { "desc": "quantity ordered", "is_derived": false, "name": "quantityordered", "norm_name": "quantityordered" } ], "orders": [ { "desc": "customer number", "is_derived": false, "name": "customernumber", "norm_name": "customernumber" }, { "desc": "status", "is_derived": false, "name": "status", "norm_name": "status" }, { "desc": "shipped Date", "is_derived": false, "name": "shippeddate", "norm_name": "shippeddate" }, { "desc": "unique order number", "is_derived": false, "name": "ordernumber", "norm_name": "ordernumber" }, { "desc": "order date", "is_derived": false, "name": "orderdate", "norm_name": "orderdate" } ], "payments": [ { "desc": "customer number", "is_derived": false, "name": "customernumber", "norm_name": "customernumber" }, { "desc": "payment Date", "is_derived": false, "name": "paymentdate", "norm_name": "paymentdate" }, { "desc": "amount", "is_derived": false, "name": "amount", "norm_name": "amount" } ], "products": [ { "desc": "Average actual profit gained from the product.", "is_derived": true, "name": "average_actual_profit", "norm_name": "averageactualprofit", "provenance": "SELECT AVG((od.priceeach - p.buyprice) * od.quantityordered) AS average_actual_profit FROM orderdetails od JOIN products p ON od.productcode = p.productcode;", "provenance_cols": { "orderdetails": [ "priceeach", "quantityordered", "productcode" ], "products": [ "buyprice", "productcode" ] } }, { "desc": "Price at which the product is bought.", "is_derived": false, "name": "buyprice", "norm_name": "buyprice" }, { "desc": "Name of the product.", "is_derived": false, "name": "productname", "norm_name": "productname" }, { "desc": "Expected profit per piece of the product.", "is_derived": true, "name": "expected_profit_per_piece", "norm_name": "expectedprofitperpiece", "provenance": "SELECT p.productcode, p.productname, (p.msrp - p.buyprice) AS expected_profit_per_piece FROM products p", "provenance_cols": { "products": [ "productcode", "productname", "msrp", "buyprice" ] } }, { "desc": "Unique identifier for the product.", "is_derived": false, "name": "productcode", "norm_name": "productcode" }, { "desc": "Total quantity of the product sold in 2003, replace NULL values with 0.", "is_derived": true, "name": "total_quantity_sold_in_2003", "norm_name": "totalquantitysoldin2003", "provenance": "SELECT COALESCE(SUM(od.quantityordered), 0) AS total_quantity FROM orderdetails od JOIN orders o ON od.ordernumber = o.ordernumber WHERE STRFTIME('%Y', o.orderdate) = '2003';", "provenance_cols": { "orderdetails": [ "quantityordered", "ordernumber" ], "orders": [ "ordernumber", "orderdate" ] } }, { "desc": "Number of the product has been ordered, replace NULL values with 0.", "is_derived": true, "name": "number_of_product_ordered", "norm_name": "numberofproductordered", "provenance": "SELECT p.productname, IFNULL(SUM(od.quantityordered), 0) AS total_ordered FROM products p LEFT JOIN orderdetails od ON p.productcode = od.productcode GROUP BY p.productname", "provenance_cols": { "orderdetails": [ "quantityordered", "productcode" ], "products": [ "productname", "productcode" ] } }, { "desc": "Number of customers who have ordered the product, replace NULL values with 0.", "is_derived": true, "name": "num_of_customers", "norm_name": "numofcustomers", "provenance": "SELECT COUNT(DISTINCT T1.customernumber) FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customernumber = T2.customernumber INNER JOIN orderdetails AS T3 ON T2.ordernumber = T3.ordernumber;", "provenance_cols": { "customers": [ "customernumber" ], "orderdetails": [ "ordernumber" ], "orders": [ "customernumber", "ordernumber" ] } }, { "desc": "product line name", "is_derived": false, "name": "productline", "norm_name": "productline" }, { "desc": "Manufacturer Suggested Retail Price", "is_derived": false, "name": "msrp", "norm_name": "msrp" } ] }, "dprs": [ "Collect automobile sales data that will allow queries on customer information, sales performance and sales organization details, including customer details, payment history, profit gained and sales offices. It should provide insights into customer behavior, credit limits, and shipment details, allowing for evaluation of sales strategies and customer relationships. It should also support assessment of customer value and potential for future business.", "Collect automobile sales data that will allow queries on customer information and purchase history, including contact details, seller details, payment status, and financial transactions, allowing for insights into customer behavior and sales performance.", "Collect automobile sales data that will allow queries on customer information and purchase history. It should include details such as customer identity, location, and contact information, as well as financial data like payments, transaction details of the seller, credit limits, and profit gained. It should also be used to understand customer behavior and sales performance." ], "relevant_ques_in_bird": [ "Name the product from the 'Classic Cars' production line that has the greatest expected profit.", "Of all the orders placed and shipped throughout the year 2005, what percentage of those orders corresponds to customer number 186?", "Please list all the customers that have Steve Patterson as their sales representitive.", "How many customers have an employee who reports to William Patterson as their sales representitive?", "Who is the sales agent of the distinct customer who paid the highest amount in the year 2004?", "Who is the sales agent of the customer who has made the highest payment? Include the full names of employee and his/her supervisor.", "What is the total actual profit gained from orders made by American customers from 2003-01-06 to 2005-05-09?", "From which branch does the sales representative employee who made the most sales in 2005? Please indicates its full address and phone number." ], "topics_from_dp_tables": [ "payment processing", "auto sales", "customer management", "retail industry", "vehicle sales", "product sales", "car retail", "order management", "automotive industry", "employee management", "sales management" ], "topics_from_dpr": [ "financial transactions", "sales performance", "automobile sales data", "customer information", "sales strategies", "customer behavior" ] }, "card_games": { "dp_tables": { "cards": [ { "desc": "id", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "The set printing code that the card is from.", "is_derived": false, "name": "setcode", "norm_name": "setcode" }, { "desc": "The name of the card.", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": "If the card does not have a text box.", "is_derived": false, "name": "istextless", "norm_name": "istextless" }, { "desc": "A list of the card's available printing types.", "is_derived": false, "name": "availability", "norm_name": "availability" }, { "desc": "A list of card supertypes found before em-dash.", "is_derived": false, "name": "supertypes", "norm_name": "supertypes" }, { "desc": "A list of card subtypes found after em-dash.", "is_derived": false, "name": "subtypes", "norm_name": "subtypes" }, { "desc": "The universal unique identifier (v5) generated by MTGJSON. Each entry is unique.", "is_derived": false, "name": "uuid", "norm_name": "uuid" }, { "desc": "The name of the artist that illustrated the card art.", "is_derived": false, "name": "artist", "norm_name": "artist" }, { "desc": "If the card marked by Wizards of the Coast (opens new window) for having sensitive content. See this official article (opens new window) for more information.", "is_derived": false, "name": "hascontentwarning", "norm_name": "hascontentwarning" }, { "desc": "A list of all card types of the card", "is_derived": false, "name": "types", "norm_name": "types" } ], "foreign_data": [ { "desc": "unique id number identifying this row of data", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "uuid", "is_derived": false, "name": "uuid", "norm_name": "uuid" }, { "desc": "The foreign language of card.", "is_derived": false, "name": "language", "norm_name": "language" } ], "legalities": [ { "desc": "unique id identifying this legality", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "uuid", "is_derived": false, "name": "uuid", "norm_name": "uuid" }, { "desc": "format of play", "is_derived": false, "name": "format", "norm_name": "format" }, { "desc": "status", "is_derived": false, "name": "status", "norm_name": "status" } ], "rulings": [ { "desc": "unique id identifying this ruling", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "uuid", "is_derived": false, "name": "uuid", "norm_name": "uuid" }, { "desc": "description about this ruling", "is_derived": false, "name": "text", "norm_name": "text" } ], "set_translations": [ { "desc": "unique id identifying this set", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "language of this card set", "is_derived": false, "name": "language", "norm_name": "language" }, { "desc": "translation of this card", "is_derived": false, "name": "translation", "norm_name": "translation" }, { "desc": "the set code for this set", "is_derived": false, "name": "setcode", "norm_name": "setcode" } ], "sets": [ { "desc": "The name of card in the set with the highest converted mana cost, with ties broken by the ascending order of the card name", "is_derived": true, "name": "card_has_highest_converted_mana_cost", "norm_name": "cardhashighestconvertedmanacost", "provenance": "SELECT name FROM cards ORDER BY convertedmanacost DESC, name ASC LIMIT 1;", "provenance_cols": { "cards": [ "name", "convertedmanacost" ] } }, { "desc": "Set to 1 if the card set has Japanses translation and is only available non-foil.", "is_derived": true, "name": "has_Japanese_translation_and_only_available_in_non_foil", "norm_name": "hasjapanesetranslationandonlyavailableinnonfoil", "provenance": "SELECT c.setcode FROM cards c JOIN set_translations st ON c.setcode = st.setcode WHERE st.language = 'Japanese' AND c.hasnonfoil = 1 AND c.hasfoil = 0", "provenance_cols": { "cards": [ "setcode", "hasnonfoil", "hasfoil" ], "set_translations": [ "setcode", "language" ] } }, { "desc": "unique id identifying this set", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "The number of cards in the set, replace NULL values with 0.", "is_derived": true, "name": "num_cards", "norm_name": "numcards", "provenance": "SELECT COALESCE(basesetsize, 0) AS number_of_cards FROM sets;", "provenance_cols": { "sets": [ "basesetsize" ] } }, { "desc": "The number of translations of the card set, replace NULL values with 0.", "is_derived": true, "name": "num_translations", "norm_name": "numtranslations", "provenance": "SELECT COALESCE(COUNT(translation), 0) AS number_of_translations FROM set_translations;", "provenance_cols": {} }, { "desc": "The percentage of the cards with a converted Mana Cost of 10 in the set.", "is_derived": true, "name": "per_cards_with_a_converted_mana_cost_10", "norm_name": "percardswithaconvertedmanacost10", "provenance": "SELECT CAST(SUM(CASE WHEN convertedmanacost = 10 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards;", "provenance_cols": { "cards": [ "convertedmanacost" ] } } ] }, "dprs": [ "Collect data that will allow queries on card games, including details about cards, sets, and translations. It should cover aspects such as card types, artists, rarity, and availability, as well as set-level information like languages and formats. It should also include details to support examination of card characteristics and set features.", "Collect data that will allow queries on card games, including details about cards, sets, and translations. It should cover various aspects such as card types, colors, rarity, and artist information, as well as set-level data like availability and language. It should also include details that support examination of card characteristics and set features.", "Collect data that will allow queries on card game sets, including details about cards, sets, and translations. It should cover information such as card types, artists, and rarity, as well as set-level data like availability and language. It should also include details to support examination of card characteristics and set features." ], "relevant_ques_in_bird": [ "Lists the set code of all cards translated into Spanish.", "Please list the names of the cards that have a text box.", "Lists all types of cards available in arena.", "List down the uuid for legacy cards and the foreign language of these cards.", "Lists all types of cards in German.", "For all cards illustrated by Jim Pavelec. and describe the text of the ruling of these cards. Do these cards have missing or degraded properties and values.", "Find all cards illustrated by Stephen Daniel and describe the text of the ruling of these cards. State if these cards have missing or degraded properties and values.", "Lists by ID all Creature-type cards with legal status." ], "topics_from_dp_tables": [ "card games", "gaming", "trading card games", "collectible card games" ], "topics_from_dpr": [ "set information and translations", "card types and characteristics", "card game data" ] }, "chicago_crime": { "dp_tables": { "community_area": [ { "desc": "Name of the community area.", "is_derived": false, "name": "community_area_name", "norm_name": "communityareaname" }, { "desc": "Number of crimes reported in the community area, replace NULL values with 0.", "is_derived": true, "name": "num_crimes", "norm_name": "numcrimes", "provenance": "SELECT ca.community_area_no, COALESCE(COUNT(c.report_no), 0) as number_of_crimes FROM community_area ca LEFT JOIN crime c ON ca.community_area_no = c.community_area_no GROUP BY ca.community_area_no ORDER BY ca.community_area_no;", "provenance_cols": { "community_area": [ "community_area_no" ], "crime": [ "report_no", "community_area_no" ] } }, { "desc": "Unique identifier for the community area.", "is_derived": false, "name": "community_area_no", "norm_name": "communityareano" }, { "desc": "district", "is_derived": false, "name": "side", "norm_name": "side" }, { "desc": "population of the community", "is_derived": false, "name": "population", "norm_name": "population" } ], "crime": [ { "desc": "A number indicating the geographic subdivision of the police district where the incident occurred", "is_derived": false, "name": "district_no", "norm_name": "districtno" }, { "desc": "A true/false value indicating if the incident is as case of domestic violence", "is_derived": false, "name": "domestic", "norm_name": "domestic" }, { "desc": "A number identifying one of 77 geographic areas where the incident occurred", "is_derived": false, "name": "community_area_no", "norm_name": "communityareano" }, { "desc": "A true/false value indicating if an arrest has been made", "is_derived": false, "name": "arrest", "norm_name": "arrest" }, { "desc": "unique Numeric identifier of the crime report.", "is_derived": false, "name": "report_no", "norm_name": "reportno" }, { "desc": "Case number assigned to the reported crime.", "is_derived": false, "name": "case_number", "norm_name": "casenumber" }, { "desc": "A two digit number identifying the legislative district (ward) where the incident occurred.", "is_derived": false, "name": "ward_no", "norm_name": "wardno" }, { "desc": "The longitude where incident is reported to have occurred.", "is_derived": false, "name": "longitude", "norm_name": "longitude" }, { "desc": "The latitude where incident is reported to have occurred.", "is_derived": false, "name": "latitude", "norm_name": "latitude" } ], "district": [ { "desc": "Difference between the number of vehicular hijackings and the number of aggravated vehicular hijackings reported in the district.", "is_derived": true, "name": "diff_bewteen_vehicular_hijackings_and_aggravated_vehicular_hijackings", "norm_name": "diffbewteenvehicularhijackingsandaggravatedvehicularhijackings", "provenance": "SELECT SUM(CASE WHEN T1.secondary_description = 'Vehicular Hijacking' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.secondary_description = 'Aggravated Vehicular Hijacking' THEN 1 ELSE 0 END) AS difference FROM iucr AS T1 INNER JOIN crime AS T2 ON T1.iucr_no = T2.iucr_no;", "provenance_cols": { "crime": [ "iucr_no" ], "iucr": [ "secondary_description", "iucr_no" ] } }, { "desc": "Name of the district.", "is_derived": false, "name": "district_name", "norm_name": "districtname" }, { "desc": "Unique identifier for the district.", "is_derived": false, "name": "district_no", "norm_name": "districtno" }, { "desc": "Email of the district.", "is_derived": false, "name": "email", "norm_name": "email" }, { "desc": "Number of crimes reported in the district, replace NULL values with 0.", "is_derived": true, "name": "num_crimes", "norm_name": "numcrimes", "provenance": "SELECT COALESCE(T1.district_name, 'Unknown') AS district_name, COUNT(T2.report_no) AS number_of_crimes FROM district T1 LEFT JOIN crime T2 ON T1.district_no = T2.district_no GROUP BY T1.district_name", "provenance_cols": { "crime": [ "report_no", "district_no" ], "district": [ "district_name", "district_no" ] } }, { "desc": "Number of crimes reported in January 2018 in the district, replace NULL values with 0.", "is_derived": true, "name": "num_crimes_Jan_2018", "norm_name": "numcrimesjan2018", "provenance": "SELECT COALESCE(COUNT(*), 0) FROM crime WHERE STRFTIME('%Y', date) = '2018' AND STRFTIME('%m', date) = '01'", "provenance_cols": {} }, { "desc": "Number of domestic violence cases reported in the district, replace NULL values with 0.", "is_derived": true, "name": "num_domestic_violence", "norm_name": "numdomesticviolence", "provenance": "SELECT COALESCE(T1.district_name, 0) AS district_name, COUNT(*) as num_domestic_violence_cases FROM crime AS T2 LEFT JOIN district AS T1 ON T2.district_no = T1.district_no WHERE T2.domestic = 'TRUE' GROUP BY T1.district_name", "provenance_cols": { "crime": [ "district_no", "domestic" ], "district": [ "district_name", "district_no" ] } }, { "desc": "Percentage of crimes reported in the district that happened inside the house.", "is_derived": true, "name": "per_crimes_heppened_inside_the_house", "norm_name": "percrimesheppenedinsidethehouse", "provenance": "SELECT district_no, SUM(CASE WHEN location_description = 'RESIDENCE' THEN 1 ELSE 0 END) / COUNT(report_no) * 100 AS percentage_of_crimes_inside_house FROM crime GROUP BY district_no", "provenance_cols": { "crime": [ "district_no", "location_description", "report_no" ] } }, { "desc": "Name of the district's commanding officer", "is_derived": false, "name": "commander", "norm_name": "commander" } ], "ward": [ { "desc": "ward_email", "is_derived": false, "name": "ward_email", "norm_name": "wardemail" }, { "desc": "ward_no", "is_derived": false, "name": "ward_no", "norm_name": "wardno" } ] }, "dprs": [ "Collect data that will allow queries on crime incidents in Chicago, including details about the type of crime, location, and circumstances surrounding the incident, as well as information about the community area and district where the crime occurred.", "Collect data that will allow queries on crime incidents in Chicago, including details about the crime, location, and community area. It should provide information on the type of crime, whether an arrest was made, and if it was a case of domestic violence. It should also include demographic information about the community area, such as population and neighborhood names.", "Collect data that will allow queries on crime incidents in Chicago, including details about the type of crime, location, and demographics of the affected community, as well as information about arrests and domestic violence cases, allowing for a comprehensive understanding of crime patterns and trends." ], "relevant_ques_in_bird": [ "Who is the person responsible for the crime cases in Central Chicago?", "How many crimes had happened in Central Chicago?", "Find the community area where the least number of domestic crimes happened.", "Among all the crimes that had happened in Central Chicago, how many of them were cases of domestic violence?", "Please list the case numbers of all the crimes with no arrest made in Central Chicago.", "What is the average number of crimes in a neighborhood in Central Chicago?", "Among the crimes in all the districts in Chicago, what is the percentage of them happening in the Central district?", "List the report number of crimes reported in a community area in the far north side with a population greater than 60,000.", "How many domestic violence cases were brought in the ward that uses \"ward13@cityofchicago.org\"?", "Please list the precise location coordinates of all the crimes in Central Chicago." ], "topics_from_dp_tables": [ "law enforcement", "crime prevention", "crime statistics", "criminal justice", "criminology", "community policing", "public safety", "sociology of crime", "urban crime", "violent crime" ], "topics_from_dpr": [ "law enforcement information", "crime statistics", "geographic information", "demographic data" ] }, "codebase_community": { "dp_tables": { "badges": [ { "desc": "the badge id", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "the unique id of the user", "is_derived": false, "name": "userid", "norm_name": "userid" }, { "desc": "the date that the user obtained the badge", "is_derived": false, "name": "date", "norm_name": "date" }, { "desc": "the badge name the user obtained", "is_derived": false, "name": "name", "norm_name": "name" } ], "comments": [ { "desc": "Date when the post was created.", "is_derived": false, "name": "creationdate", "norm_name": "creationdate" }, { "desc": "Unique identifier for the post.", "is_derived": false, "name": "postid", "norm_name": "postid" }, { "desc": "the comment Id", "is_derived": false, "name": "id", "norm_name": "id" } ], "posthistory": [ { "desc": "the post history id", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "the creation date of the post", "is_derived": false, "name": "creationdate", "norm_name": "creationdate" }, { "desc": "the unique id of the post", "is_derived": false, "name": "postid", "norm_name": "postid" }, { "desc": "user's display name", "is_derived": false, "name": "userdisplayname", "norm_name": "userdisplayname" }, { "desc": "the user who post the post", "is_derived": false, "name": "userid", "norm_name": "userid" }, { "desc": "the detailed content of the post", "is_derived": false, "name": "text", "norm_name": "text" } ], "postlinks": [ { "desc": "the post link id", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "the post id", "is_derived": false, "name": "postid", "norm_name": "postid" }, { "desc": "the creation date of the post link", "is_derived": false, "name": "creationdate", "norm_name": "creationdate" } ], "posts": [ { "desc": "Number of times the post has been viewed.", "is_derived": false, "name": "viewcount", "norm_name": "viewcount" }, { "desc": "the average score of comments that were added to the post", "is_derived": true, "name": "avg_score_of_comments", "norm_name": "avgscoreofcomments", "provenance": "SELECT AVG(score) FROM comments;", "provenance_cols": { "comments": [ "score" ] } }, { "desc": "the comment of the post that has the highest score, with ties broken by the ascending order of the text.", "is_derived": true, "name": "comment_with_the_highest_score", "norm_name": "commentwiththehighestscore", "provenance": "SELECT comment FROM posthistory WHERE postid = ( SELECT id FROM posts ORDER BY score DESC, id ASC LIMIT 1 )", "provenance_cols": { "posthistory": [ "postid", "id" ], "posts": [ "score" ] } }, { "desc": "Set to 1 if the number of views on the post is above the average number of views on all posts; otherwise, set to 0.", "is_derived": true, "name": "has_views_above_average", "norm_name": "hasviewsaboveaverage", "provenance": "SELECT id, viewcount, CASE WHEN viewcount > (SELECT AVG(viewcount) FROM posts) THEN 1 ELSE 0 END AS is_above_average FROM posts;", "provenance_cols": { "posts": [ "id", "viewcount" ] } }, { "desc": "Number of unique users who have commented on the post, replace NULL values with 0.", "is_derived": true, "name": "num_unique_users_commented", "norm_name": "numuniqueuserscommented", "provenance": "SELECT COUNT(DISTINCT userid) FROM comments WHERE postid = ? AND userid IS NOT NULL;", "provenance_cols": { "comments": [ "userid", "postid" ] } }, { "desc": "Set to 1 if the post was posted by the most influential user, otherwise, set to 0.", "is_derived": true, "name": "posted_by_most_influential_user", "norm_name": "postedbymostinfluentialuser", "provenance": "SELECT p.id, CASE WHEN u.reputation = (SELECT MAX(reputation) FROM users) THEN 1 ELSE 0 END AS most_influential_user FROM posts p JOIN users u ON p.owneruserid = u.id;", "provenance_cols": { "posts": [ "id", "owneruserid" ], "users": [ "reputation", "reputation", "id" ] } }, { "desc": "the post id", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "the title of the post", "is_derived": false, "name": "title", "norm_name": "title" }, { "desc": "the id of the owner user", "is_derived": false, "name": "owneruserid", "norm_name": "owneruserid" }, { "desc": "the id of the last editor", "is_derived": false, "name": "lasteditoruserid", "norm_name": "lasteditoruserid" } ], "users": [ { "desc": "Display name of the user.", "is_derived": false, "name": "displayname", "norm_name": "displayname" }, { "desc": "Unique identifier for the user.", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "Set to 1 if the user has created at least one post with a score of more than 60; otherwise, set to 0.", "is_derived": true, "name": "created_post_with_score_more_than_60", "norm_name": "createdpostwithscoremorethan60", "provenance": "SELECT p.owneruserid, CASE WHEN SUM(CASE WHEN p.score > 60 THEN 1 ELSE 0 END) > 0 THEN 1 ELSE 0 END AS has_high_score_post FROM posts p GROUP BY p.owneruserid", "provenance_cols": { "posts": [ "owneruserid", "score" ] } }, { "desc": "Number of badges the user has earned, replace NULL values with 0.", "is_derived": true, "name": "num_badges", "norm_name": "numbadges", "provenance": "SELECT userid, COUNT(name) AS number_of_badges FROM badges GROUP BY userid;", "provenance_cols": { "badges": [ "userid", "name" ] } }, { "desc": "Number of comments the user has posted, replace NULL values with 0.", "is_derived": true, "name": "num_comments", "norm_name": "numcomments", "provenance": "SELECT u.id, COALESCE(c.comment_count, 0) AS comment_count FROM users u LEFT JOIN (SELECT userid, COUNT(id) AS comment_count FROM comments GROUP BY userid) c ON u.id = c.userid;", "provenance_cols": { "comments": [ "userid" ], "users": [ "id", "id" ] } }, { "desc": "Number of posts the user has voted on, replace NULL values with 0.", "is_derived": true, "name": "num_posts_voted", "norm_name": "numpostsvoted", "provenance": "SELECT u.id, COALESCE(v.vote_count, 0) AS vote_count FROM users u LEFT JOIN (SELECT userid, COUNT(*) AS vote_count FROM votes GROUP BY userid) v ON u.id = v.userid;", "provenance_cols": { "users": [ "id" ], "votes": [ "userid" ] } }, { "desc": "Sum of the favourite count gained by the user in 2011, replace NULL values with 0.", "is_derived": true, "name": "sum_of_favourite_count_gained_2011", "norm_name": "sumoffavouritecountgained2011", "provenance": "SELECT COALESCE(SUM(p.favoritecount), 0) FROM posts p WHERE p.creaiondate BETWEEN '2011-01-01' AND '2011-12-31';", "provenance_cols": { "posts": [ "favoritecount", "creaiondate" ] } }, { "desc": "the creation date of the user account", "is_derived": false, "name": "creationdate", "norm_name": "creationdate" }, { "desc": "the number of upvotes", "is_derived": false, "name": "upvotes", "norm_name": "upvotes" }, { "desc": "user's age", "is_derived": false, "name": "age", "norm_name": "age" }, { "desc": "the number of views ", "is_derived": false, "name": "views", "norm_name": "views" }, { "desc": "user's location", "is_derived": false, "name": "location", "norm_name": "location" }, { "desc": "the last access date of the user account", "is_derived": false, "name": "lastaccessdate", "norm_name": "lastaccessdate" } ], "votes": [ { "desc": "the creation date of the vote", "is_derived": false, "name": "creationdate", "norm_name": "creationdate" }, { "desc": "the id of the post that is voted", "is_derived": false, "name": "postid", "norm_name": "postid" }, { "desc": "the vote id", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "the id of the voter", "is_derived": false, "name": "userid", "norm_name": "userid" } ] }, "dprs": [ "Collect data that will allow queries on user engagement and behavior, including comments, badges, and voting activity. It should provide information about user interactions, such as posting and voting, as well as user achievements, like earning badges. It should also include details to understand user participation and reputation within the community.", "Collect data that will allow queries on user engagement and behavior on a platform. It should include information about user comments, badges earned, and interactions with posts, such as voting and creating content. It should also provide insights into user activity and reputation, allowing for the evaluation of user influence and participation.", "Collect data that will allow queries on user behavior and engagement within a community. It should include information about user comments, badges earned, and posting activity, as well as voting history and favorite counts. It should also provide insights into user participation and reputation within the community." ], "relevant_ques_in_bird": [ "Give the number of votes for the post about data visualization.", "Identify the number of adult users who have cast over 5000 upvotes.", "Provide the display name of the user who made the vote No.6347.", "State the number of views of users who obtained the badge on 7/19/2010 7:39:08 PM.", "List all the name of users that obtained the Organizer Badges.", "Among the users who obtained the \"Organizer\" badges, calculate the percentage of users who are teenagers.", "Describe the last accessed date and location of the users who received the outliers badge.", "Identify the number of posts and comments left by the user, who has the latest created user account.", "List the post IDs and badge names of the user Samuel in 2013.", "Identify the total views on the post 'Computer Game Datasets'. Name the user who posted it last time." ], "topics_from_dp_tables": [ "stack exchange sites", "commenting systems", "social networking", "online community", "user engagement", "question and answer", "reputation systems", "badge rewards", "forum discussion" ], "topics_from_dpr": [ "social interactions", "user behavior", "user engagement", "reputation metrics", "community participation" ] }, "college_completion": { "dp_tables": { "institution_details": [ { "desc": "Institution state", "is_derived": false, "name": "state", "norm_name": "state" }, { "desc": "Institution name", "is_derived": false, "name": "chronname", "norm_name": "chronname" }, { "desc": "unique Education Unit ID number", "is_derived": false, "name": "unitid", "norm_name": "unitid" }, { "desc": "Total number of undergraduates in 2010", "is_derived": false, "name": "student_count", "norm_name": "studentcount" }, { "desc": "Institution Web site address", "is_derived": false, "name": "site", "norm_name": "site" }, { "desc": "Control of institution", "is_derived": false, "name": "control", "norm_name": "control" } ], "institution_grads": [ { "desc": "Education Unit ID number", "is_derived": false, "name": "unitid", "norm_name": "unitid" }, { "desc": "Percentage of students who graduated within 100 percent of normal/expected time", "is_derived": false, "name": "grad_100_rate", "norm_name": "grad100rate" }, { "desc": "Number of first-time, full-time, degree-seeking students in the cohort being tracked, minus any exclusions", "is_derived": false, "name": "grad_cohort", "norm_name": "gradcohort" }, { "desc": "race/ethnicity of students", "is_derived": false, "name": "race", "norm_name": "race" }, { "desc": "year of data release", "is_derived": false, "name": "year", "norm_name": "year" }, { "desc": "gender of students", "is_derived": false, "name": "gender", "norm_name": "gender" }, { "desc": "Number of students who graduated within 150 percent of normal/expected time", "is_derived": false, "name": "grad_150", "norm_name": "grad150" }, { "desc": "Number of students who graduated within 100 percent of normal/expected time", "is_derived": false, "name": "grad_100", "norm_name": "grad100" }, { "desc": "degree-seeking cohort type", "is_derived": false, "name": "cohort", "norm_name": "cohort" } ] }, "dprs": [ "Collect data that will allow queries on college completion rates, institution characteristics, and student demographics. It should include information on graduation rates, student body composition, and institutional features such as control and level. It should also cover SAT scores, freshman retention, and other metrics, allowing for comparisons across institutions and states.", "Collect data that will allow queries on college completion rates, student demographics, and institutional characteristics. It should include information on graduation rates, student body composition, and institutional features such as control, level, and location. It should also cover SAT scores, freshman retention, and other relevant metrics, providing a comprehensive overview of higher education institutions.", "Collect data that will allow queries on college completion rates, institution characteristics, and student demographics. It should include information on graduation rates, institution type, and student body composition, allowing for comparisons across different institutions and states. It should also cover factors like SAT scores, freshman retention, and institutional control, providing a comprehensive overview of higher education trends." ], "relevant_ques_in_bird": [ "What is the average percentage of students graduating within 100 percent of normal/expected time for Central Alabama Community College?", "What is the institution's name of american students within the number of degree-seeking students in the cohort that ranges from 1 to 3?", "List the site of institution within the student count of 500 to 1000 that has the recent year of data release.", "Give the state and name of institutions in year of data release from 2010 to 2012 with black students.", "Which institute has the highest percentage of male White students graduating in 2011 within 150 percent of normal/expected time?", "Please list the names of the institutes with the percentage of male White students graduating in 2011 within 150 percent of normal/expected time over 20.", "Among the public institutes in the state of Alabama, how many of them have over 30 students who graduated within 100 percent of normal/expected time in 2011?", "Among the black students in 2011, list the institution site and name of those who has 20 t0 30 degree-seeking students in the cohort.", "What is the website address of the institution with the highest number of White degree-seeking students at 2-year institutions in 2008?" ], "topics_from_dp_tables": [ "graduation rates", "institutional research", "higher education", "student demographics", "college and university", "education" ], "topics_from_dpr": [ "graduation rates", "higher education trends", "standardized test scores", "college completion rates", "student demographics", "institutional characteristics" ] }, "donor": { "dp_tables": { "donations": [ { "desc": "project identifier that received the donation", "is_derived": false, "name": "projectid", "norm_name": "projectid" }, { "desc": "whether donor is also a teacher", "is_derived": false, "name": "is_teacher_acct", "norm_name": "isteacheracct" }, { "desc": "amount of optional support", "is_derived": false, "name": "donation_optional_support", "norm_name": "donationoptionalsupport" }, { "desc": "donor that made a donation", "is_derived": false, "name": "donor_acctid", "norm_name": "donoracctid" }, { "desc": "donated amount", "is_derived": false, "name": "donation_total", "norm_name": "donationtotal" }, { "desc": "donated amount in US dollars", "is_derived": false, "name": "dollar_amount", "norm_name": "dollaramount" }, { "desc": "donation made for an honoree", "is_derived": false, "name": "for_honoree", "norm_name": "forhonoree" }, { "desc": "donation zip code", "is_derived": false, "name": "donor_zip", "norm_name": "donorzip" }, { "desc": "amount to project, excluding optional support (tip)", "is_derived": false, "name": "donation_to_project", "norm_name": "donationtoproject" }, { "desc": "unique donation identifier", "is_derived": false, "name": "donationid", "norm_name": "donationid" } ], "essays": [ { "desc": "unique project identifier", "is_derived": false, "name": "projectid", "norm_name": "projectid" }, { "desc": "short description of a project", "is_derived": false, "name": "short_description", "norm_name": "shortdescription" }, { "desc": "title of the project", "is_derived": false, "name": "title", "norm_name": "title" } ], "projects": [ { "desc": "project's unique identifier", "is_derived": false, "name": "projectid", "norm_name": "projectid" }, { "desc": "The city where the school is located.", "is_derived": false, "name": "school_city", "norm_name": "schoolcity" }, { "desc": "Unique identifier for the school.", "is_derived": false, "name": "schoolid", "norm_name": "schoolid" }, { "desc": "Set to 1 if the project has resources provided by 'Lakeshore Learning Materials', otherwise, set to 0", "is_derived": true, "name": "has_resources_provided_by_LLM", "norm_name": "hasresourcesprovidedbyllm", "provenance": "SELECT p.projectid, CASE WHEN r.vendor_name = 'Lakeshore Learning Materials' THEN 1 ELSE 0 END AS has_lakeshore_resources FROM projects p LEFT JOIN resources r ON p.projectid = r.projectid", "provenance_cols": { "projects": [ "projectid" ], "resources": [ "vendor_name", "projectid" ] } }, { "desc": "The item with the most cost in the project, with ties broken by the ascending order of the item name", "is_derived": true, "name": "item_cost_most", "norm_name": "itemcostmost", "provenance": "SELECT item_name, item_unit_price * item_quantity as cost FROM resources ORDER BY cost DESC, item_name ASC LIMIT 1;", "provenance_cols": { "resources": [ "item_name", "item_unit_price", "item_quantity" ] } }, { "desc": "The percentage of the total amount that is lacking for the project, including the optional price of the project.", "is_derived": true, "name": "percentage_lacking_amount_total", "norm_name": "percentagelackingamounttotal", "provenance": "SELECT p.projectid, (p.total_price_including_optional_support - COALESCE(SUM(d.donation_to_project + d.donation_optional_support), 0)) / p.total_price_including_optional_support * 100 AS percentage_lacking FROM projects p LEFT JOIN donations d ON p.projectid = d.projectid GROUP BY p.projectid, p.total_price_including_optional_support", "provenance_cols": { "donations": [ "donation_to_project", "donation_optional_support", "projectid" ], "projects": [ "projectid", "total_price_including_optional_support" ] } }, { "desc": "The total price of the resources needed for the project, replace NULL values with 0.", "is_derived": true, "name": "total_price_of_resources", "norm_name": "totalpriceofresources", "provenance": "SELECT COALESCE(SUM(item_unit_price * item_quantity), 0) FROM resources;", "provenance_cols": { "resources": [ "item_unit_price", "item_quantity" ] } }, { "desc": "The average amount of donation for the project.", "is_derived": true, "name": "avg_amount_donation", "norm_name": "avgamountdonation", "provenance": "SELECT AVG(donation_to_project) FROM donations;", "provenance_cols": { "donations": [ "donation_to_project" ] } }, { "desc": "main subject area for which project materials are intended", "is_derived": false, "name": "primary_focus_area", "norm_name": "primaryfocusarea" }, { "desc": "teacher's unique identifier (teacher that created a project)", "is_derived": false, "name": "teacher_acctid", "norm_name": "teacheracctid" }, { "desc": "number of students impacted by a project (if funded)", "is_derived": false, "name": "students_reached", "norm_name": "studentsreached" }, { "desc": "project cost excluding optional tip that donors give to DonorsChoose.org while funding a project", "is_derived": false, "name": "total_price_excluding_optional_support", "norm_name": "totalpriceexcludingoptionalsupport" } ], "resources": [ { "desc": "project id that requested resources for a classroom", "is_derived": false, "name": "projectid", "norm_name": "projectid" }, { "desc": "number of a specific item requested by a teacher", "is_derived": false, "name": "item_quantity", "norm_name": "itemquantity" }, { "desc": "unique resource id", "is_derived": false, "name": "resourceid", "norm_name": "resourceid" } ] }, "dprs": [ "Collect data that will allow queries on donations to educational projects, including project details, donor information, payment methods, and school characteristics, allowing for insights into funding trends and resource allocation in education.", "Collect data that will allow queries on donations and projects on a crowdfunding platform. It should include information about donors, teachers, schools, and project details, such as resource types and costs. It should also cover donation amounts, payment methods, and project status, allowing for insights into funding trends and educational resource allocation.", "Collect data that will allow queries on donations to educational projects, including project details, donor information, payment methods, and school characteristics, allowing for insights into funding patterns and resource allocation." ], "relevant_ques_in_bird": [ "For each donation not from a teacher, state the donor account id and calculate the percentage of donation given for optional support.", "What is the total donated amount for projects created by a teacher working in a school in Brooklyn?", "What is the total donation amount made for projects whose main subject area are Literacy & Language?", "What is the short description of the project that gives donation to school \u201c301c9bf0a45d159d162b65a93fddd74e\u201d?", "How much did the project that teacher \"822b7b8768c17456fdce78b65abcc18e\" created donate?", "What is the average amount of resources from projects that have received donations per honoree?", "What is the total number of students impacted by the projects with a donation from a donor with zip code \"22205\"?", "In which city is there a greater number of schools that have received donations of less than 10 dollars?", "Name the project that costs the most. How much has been collected from donation and what is the percentage amount still lacking?" ], "topics_from_dp_tables": [ "school projects", "donations", "fundraising", "philanthropy", "nonprofit organization", "teacher support", "education funding" ], "topics_from_dpr": [ "donor information", "crowdfunding data", "project details", "school characteristics", "resource allocation", "educational funding", "funding trends" ] }, "european_football_2": { "dp_tables": { "country": [ { "desc": "The name of the country the league is in.", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": "the unique id for countries", "is_derived": false, "name": "id", "norm_name": "id" } ], "league": [ { "desc": "Set to 1 if the average goal scored by the home team is higher than the away team, otherwise, set to 0.", "is_derived": true, "name": "avg_goal_by_home_team_higher_than_away_team", "norm_name": "avggoalbyhometeamhigherthanawayteam", "provenance": "SELECT CASE WHEN AVG(home_team_goal) > AVG(away_team_goal) THEN 1 ELSE 0 END FROM match;", "provenance_cols": { "match": [ "home_team_goal", "away_team_goal" ] } }, { "desc": "The team with the most wins as an away team during the 2010 season, with ties broken by the ascending order of the team long name", "is_derived": true, "name": "away_team_won_most_2010", "norm_name": "awayteamwonmost2010", "provenance": "SELECT T2.team_long_name, COUNT(M1.away_team_api_id) as num_wins FROM match M1 JOIN team T2 ON M1.away_team_api_id = T2.team_api_id WHERE M1.season = '2010/2011' AND M1.away_team_goal > M1.home_team_goal GROUP BY T2.team_long_name ORDER BY num_wins DESC, T2.team_long_name ASC LIMIT 1;", "provenance_cols": { "match": [ "away_team_api_id", "season", "away_team_goal", "home_team_goal" ], "team": [ "team_long_name", "team_api_id" ] } }, { "desc": "The name of the league.", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": "The number of matches that ended in a draw in the 2016 season, replace NULL values with 0.", "is_derived": true, "name": "num_draw_matches_2016", "norm_name": "numdrawmatches2016", "provenance": "SELECT COUNT(*) FROM match WHERE season = '2016/2017' AND (home_team_goal = away_team_goal OR (home_team_goal IS NULL AND away_team_goal IS NULL) OR (home_team_goal IS NULL AND away_team_goal = 0) OR (away_team_goal IS NULL AND home_team_goal = 0))", "provenance_cols": { "match": [ "season", "home_team_goal", "away_team_goal" ] } }, { "desc": "The total number of goals scored of the league in the 2016 season, replace NULL values with 0.", "is_derived": true, "name": "num_goals_2016", "norm_name": "numgoals2016", "provenance": "SELECT COALESCE(SUM(home_team_goal), 0) + COALESCE(SUM(away_team_goal), 0) AS total_goals FROM match WHERE season = '2016/2017';", "provenance_cols": { "match": [ "home_team_goal", "away_team_goal", "season" ] } }, { "desc": "The number of matches played of the league in the 2008-2009 season, replace NULL values with 0.", "is_derived": true, "name": "num_matches_2008_2009_season", "norm_name": "nummatches20082009season", "provenance": "SELECT COUNT(id) as number_of_matches FROM match WHERE season = '2008/2009';", "provenance_cols": { "match": [ "id", "season" ] } }, { "desc": "the unique id for leagues", "is_derived": false, "name": "id", "norm_name": "id" } ], "match": [ { "desc": "The unique identifier for the league.", "is_derived": false, "name": "league_id", "norm_name": "leagueid" }, { "desc": "the unique id for matches", "is_derived": false, "name": "id", "norm_name": "id" } ], "player": [ { "desc": "The average overall rating the player received from 2010 to 2015.", "is_derived": true, "name": "average_overall_rating_from_2010_to_2015", "norm_name": "averageoverallratingfrom2010to2015", "provenance": "SELECT AVG(overall_rating) FROM player_attributes WHERE date BETWEEN '2010-01-01' AND '2015-12-31';", "provenance_cols": { "player_attributes": [ "overall_rating" ] } }, { "desc": "The average rate of finishing the player has.", "is_derived": true, "name": "avg_finishing_rate", "norm_name": "avgfinishingrate", "provenance": "SELECT AVG(finishing) FROM player_attributes", "provenance_cols": { "player_attributes": [ "finishing" ] } }, { "desc": "The average rate of penalties the player scores.", "is_derived": true, "name": "avg_penalties_rate", "norm_name": "avgpenaltiesrate", "provenance": "SELECT AVG(penalties) AS average_rate_of_penalties FROM player_attributes;", "provenance_cols": { "player_attributes": [ "penalties" ] } }, { "desc": "The birthday of the player.", "is_derived": false, "name": "birthday", "norm_name": "birthday" }, { "desc": "Set to 1 if the player's height is above 180 cm, otherwise, set to 0.", "is_derived": true, "name": "height_above_180", "norm_name": "heightabove180", "provenance": "SELECT id, height, CASE WHEN height > 180 THEN 1 ELSE 0 END AS is_tall FROM player;", "provenance_cols": { "player": [ "id", "height" ] } }, { "desc": "Set to 1 if the player's height is under 180 cm and the overall strength is more than 70, otherwise, set to 0.", "is_derived": true, "name": "is_under_180_and_overall_strenth_more_than_70", "norm_name": "isunder180andoverallstrenthmorethan70", "provenance": "SELECT CASE WHEN p.height < 180 AND pa.strength > 70 THEN 1 ELSE 0 END FROM player p JOIN player_attributes pa ON p.player_api_id = pa.player_api_id", "provenance_cols": { "player": [ "height", "player_api_id" ], "player_attributes": [ "strength", "player_api_id" ] } }, { "desc": "The unique identifier for the player.", "is_derived": false, "name": "player_api_id", "norm_name": "playerapiid" }, { "desc": "The name of the player.", "is_derived": false, "name": "player_name", "norm_name": "playername" }, { "desc": "the player's height", "is_derived": false, "name": "height", "norm_name": "height" }, { "desc": "the unique id for players", "is_derived": false, "name": "id", "norm_name": "id" } ], "player_attributes": [ { "desc": "the id of the player api", "is_derived": false, "name": "player_api_id", "norm_name": "playerapiid" }, { "desc": "potential of the player", "is_derived": false, "name": "potential", "norm_name": "potential" }, { "desc": "the unique id for players", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "the player's preferred foot when attacking", "is_derived": false, "name": "preferred_foot", "norm_name": "preferredfoot" }, { "desc": "the player's penalties score", "is_derived": false, "name": "penalties", "norm_name": "penalties" }, { "desc": "the player's balance score", "is_derived": false, "name": "balance", "norm_name": "balance" }, { "desc": "the player's heading accuracy", "is_derived": false, "name": "heading_accuracy", "norm_name": "headingaccuracy" }, { "desc": "the id of the player fifa api", "is_derived": false, "name": "player_fifa_api_id", "norm_name": "playerfifaapiid" } ], "team": [ { "desc": "The average number of goals the team scored as the away team.", "is_derived": true, "name": "avg_num_goals_as_away_team", "norm_name": "avgnumgoalsasawayteam", "provenance": "SELECT AVG(away_team_goal) FROM match;", "provenance_cols": { "match": [ "away_team_goal" ] } }, { "desc": "Set to 1 if the team had less than the average chance creation passing in the 2014 season, otherwise, set to 0.", "is_derived": true, "name": "less_than_avg_chance_creation_passing_2014", "norm_name": "lessthanavgchancecreationpassing2014", "provenance": "SELECT team_api_id, CASE WHEN chancecreationpassing < (SELECT AVG(chancecreationpassing) FROM team_attributes WHERE date LIKE '%2014%') THEN 1 ELSE 0 END AS result FROM team_attributes WHERE date LIKE '%2014%';", "provenance_cols": { "team_attributes": [ "team_api_id", "chancecreationpassing" ] } }, { "desc": "The total number of goals the team scored, replace NULL values with 0.", "is_derived": true, "name": "num_goals", "norm_name": "numgoals", "provenance": "SELECT COALESCE(SUM(home_team_goal), 0) + COALESCE(SUM(away_team_goal), 0) AS total_goals FROM match;", "provenance_cols": { "match": [ "home_team_goal", "away_team_goal" ] } }, { "desc": "The number of matches the team lost as the home team in the 2016 season, replace NULL values with 0.", "is_derived": true, "name": "num_lost_matches_as_home_team_2016", "norm_name": "numlostmatchesashometeam2016", "provenance": "SELECT COALESCE(SUM(CASE WHEN home_team_goal < away_team_goal THEN 1 ELSE 0 END), 0) AS number_of_losses FROM match WHERE season = '2016/2017';", "provenance_cols": { "match": [ "home_team_goal", "away_team_goal", "season" ] } }, { "desc": "The number of matches the team won in the 2010 season, replace NULL values with 0.", "is_derived": true, "name": "num_won_2010", "norm_name": "numwon2010", "provenance": "SELECT COALESCE(SUM(CASE WHEN home_team_goal > away_team_goal THEN 1 ELSE 0 END), 0) + COALESCE(SUM(CASE WHEN away_team_goal > home_team_goal THEN 1 ELSE 0 END), 0) AS total_wins FROM match WHERE season = '2010';", "provenance_cols": { "match": [ "home_team_goal", "away_team_goal", "season" ] } }, { "desc": "The unique identifier for the team.", "is_derived": false, "name": "team_api_id", "norm_name": "teamapiid" }, { "desc": "The long name of the team.", "is_derived": false, "name": "team_long_name", "norm_name": "teamlongname" }, { "desc": "The short name of the team.", "is_derived": false, "name": "team_short_name", "norm_name": "teamshortname" }, { "desc": "the unique id for teams", "is_derived": false, "name": "id", "norm_name": "id" } ], "team_attributes": [ { "desc": "the id of the team api", "is_derived": false, "name": "team_api_id", "norm_name": "teamapiid" }, { "desc": "the speed in which attacks are put together ", "is_derived": false, "name": "buildupplayspeed", "norm_name": "buildupplayspeed" }, { "desc": "the tendency/ frequency of dribbling", "is_derived": false, "name": "buildupplaydribbling", "norm_name": "buildupplaydribbling" }, { "desc": "affects passing distance and support from teammates", "is_derived": false, "name": "buildupplaypassing", "norm_name": "buildupplaypassing" }, { "desc": "the unique id for teams", "is_derived": false, "name": "id", "norm_name": "id" } ] }, "dprs": [ "Collect data that will allow queries on football players and teams, including player attributes, team performance, and match outcomes, allowing for evaluation of player and team strengths and weaknesses.", "Collect data that will allow queries on football players and teams, including player attributes, team performance, and match outcomes. It should cover various aspects such as player skills, work rates, and physical characteristics, as well as team statistics like goals scored and matches won or lost. It should also include data to evaluate player and team performance, identify trends, and make informed decisions.", "Collect data that will allow queries on football player and team performance. It should include player attributes like skills and physical characteristics, as well as team statistics such as goals scored and match outcomes. It should cover various aspects of football, allowing for comprehensive evaluation and comparison of players and teams." ], "relevant_ques_in_bird": [ "Please provide the names of top three football players who are over 180 cm tall in alphabetical order.", "Please provide top five football players' IDs who are among the lowest potential players and prefer to use the right foot when attacking.", "Indicate the full names of the top 10 players with the highest number of penalties.", "Calculate the percentage of players who prefer left foot, who were born between 1987 and 1992.", "List out of players whose preferred foot is left.", "List all the football player with the highest balance score and potential score of 61.", "List the football team that has a build up play speed of 31, build up plan dribbling of 53, and build up play passing of 32. Only indicate the short name of the team.", "List the top 10 players' names whose heights are above 180 in descending order of average heading accuracy." ], "topics_from_dp_tables": [ "european football", "player statistics", "sports teams", "team performance", "football players", "league tables", "football", "soccer" ], "topics_from_dpr": [ "match outcomes analysis", "player skills evaluation", "team and player comparison", "football player attributes", "team performance statistics" ] }, "financial": { "dp_tables": { "account": [ { "desc": "location of branch", "is_derived": false, "name": "district_id", "norm_name": "districtid" }, { "desc": "the creation date of the account", "is_derived": false, "name": "date", "norm_name": "date" }, { "desc": "the id of the account", "is_derived": false, "name": "account_id", "norm_name": "accountid" } ], "card": [ { "desc": "the date when the credit card issued", "is_derived": false, "name": "issued", "norm_name": "issued" }, { "desc": "type of credit card", "is_derived": false, "name": "type", "norm_name": "type" }, { "desc": "disposition id", "is_derived": false, "name": "disp_id", "norm_name": "dispid" }, { "desc": "id number of credit card", "is_derived": false, "name": "card_id", "norm_name": "cardid" } ], "client": [ { "desc": "the amount of the first transaction by the client, with ties broken by the descending order of the amount.", "is_derived": true, "name": "amount_of_first_transaction", "norm_name": "amountoffirsttransaction", "provenance": "SELECT amount FROM trans WHERE (account_id, date) IN ( SELECT account_id, MIN(date) FROM trans GROUP BY account_id ) ORDER BY amount DESC LIMIT 1;", "provenance_cols": { "trans": [ "amount", "account_id" ] } }, { "desc": "The average loan amount the client has taken.", "is_derived": true, "name": "avg_loan_amount", "norm_name": "avgloanamount", "provenance": "SELECT AVG(T1.amount) FROM loan AS T1 JOIN account AS T2 ON T1.account_id = T2.account_id JOIN disp AS T3 ON T2.account_id = T3.account_id JOIN client AS T4 ON T3.client_id = T4.client_id;", "provenance_cols": { "account": [ "account_id" ], "client": [ "client_id" ], "disp": [ "account_id", "client_id" ], "loan": [ "amount", "account_id" ] } }, { "desc": "The birth date of the client.", "is_derived": false, "name": "birth_date", "norm_name": "birthdate" }, { "desc": "The unique identifier for the client.", "is_derived": false, "name": "client_id", "norm_name": "clientid" }, { "desc": "The gender of the client.", "is_derived": false, "name": "gender", "norm_name": "gender" }, { "desc": "The largest loan amount the client has taken.", "is_derived": true, "name": "largest_loan_amount", "norm_name": "largestloanamount", "provenance": "SELECT MAX(amount) FROM loan;", "provenance_cols": { "loan": [ "amount" ] } }, { "desc": "The number of withdrawals in cash transactions by the client, replace NULL values with 0.", "is_derived": true, "name": "num_withdrawals_in_cash_transactions", "norm_name": "numwithdrawalsincashtransactions", "provenance": "SELECT COUNT(CASE WHEN t.operation = 'VYBER' THEN 1 ELSE NULL END) AS number_of_withdrawals FROM trans t WHERE t.type = 'VYBER'", "provenance_cols": { "trans": [ "operation", "type" ] } }, { "desc": "The total amount the client paid for all of the transactions in 1998, replace NULL values with 0.", "is_derived": true, "name": "total_pay_for_all_transactions_1998", "norm_name": "totalpayforalltransactions1998", "provenance": "SELECT COALESCE(SUM(CASE WHEN type = 'VKL' THEN amount ELSE 0 END), 0) AS total_amount FROM trans WHERE STRFTIME('%Y', date) = '1998';", "provenance_cols": { "trans": [ "amount" ] } }, { "desc": "location of branch", "is_derived": false, "name": "district_id", "norm_name": "districtid" } ], "disp": [ { "desc": "id number of client", "is_derived": false, "name": "client_id", "norm_name": "clientid" }, { "desc": "unique number of identifying this row of record", "is_derived": false, "name": "disp_id", "norm_name": "dispid" }, { "desc": "type of disposition", "is_derived": false, "name": "type", "norm_name": "type" }, { "desc": "id number of account", "is_derived": false, "name": "account_id", "norm_name": "accountid" } ], "district": [ { "desc": "The average transaction amount in 1997.", "is_derived": true, "name": "avg_transaction_amount_1997", "norm_name": "avgtransactionamount1997", "provenance": "SELECT AVG(amount) FROM trans WHERE STRFTIME('%Y', date) = '1997';", "provenance_cols": { "trans": [ "amount" ] } }, { "desc": "The unique identifier for the district.", "is_derived": false, "name": "district_id", "norm_name": "districtid" }, { "desc": "The number of accounts with loan contracts finished with no problems, replace NULL values with 0.", "is_derived": true, "name": "num_accounts_with_load_finished_no_problem", "norm_name": "numaccountswithloadfinishednoproblem", "provenance": "SELECT COUNT(*) FROM loan WHERE status = 'finished' AND amount IS NOT NULL;", "provenance_cols": { "loan": [ "status", "amount" ] } }, { "desc": "The number of male clients in the district, replace NULL values with 0.", "is_derived": true, "name": "num_male_clients", "norm_name": "nummaleclients", "provenance": "SELECT COALESCE(SUM(CASE WHEN T1.gender = 'm' THEN 1 ELSE 0 END), 0) FROM client AS T1 LEFT JOIN district AS T2 ON T1.district_id = T2.district_id;", "provenance_cols": { "client": [ "gender", "district_id" ], "district": [ "district_id" ] } }, { "desc": "The number of accounts opened in the district, replace NULL values with 0.", "is_derived": true, "name": "num_opened_accounts", "norm_name": "numopenedaccounts", "provenance": "SELECT COALESCE(COUNT(account_id), 0) FROM account;", "provenance_cols": { "account": [ "account_id" ] } }, { "desc": "The percentage of accounts from the district among all accounts opened in 1993.", "is_derived": true, "name": "per_account_opened_1993", "norm_name": "peraccountopened1993", "provenance": "SELECT CAST(SUM(CASE WHEN T1.district_id = T2.district_id THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.account_id) AS percentage FROM account T1 JOIN district T2 ON T1.district_id = T2.district_id WHERE EXTRACT(YEAR FROM T1.date) = 1993;", "provenance_cols": { "account": [ "district_id", "account_id", "date" ], "district": [ "district_id" ] } }, { "desc": "The name of the district.", "is_derived": false, "name": "a2", "norm_name": "a2" }, { "desc": "average salary", "is_derived": false, "name": "a11", "norm_name": "a11" }, { "desc": "region", "is_derived": false, "name": "a3", "norm_name": "a3" } ], "loan": [ { "desc": "approved amount", "is_derived": false, "name": "amount", "norm_name": "amount" }, { "desc": "loan duration", "is_derived": false, "name": "duration", "norm_name": "duration" }, { "desc": "the id number identifying the account", "is_derived": false, "name": "account_id", "norm_name": "accountid" }, { "desc": "the id number identifying the loan data", "is_derived": false, "name": "loan_id", "norm_name": "loanid" } ], "trans": [ { "desc": "account_id", "is_derived": false, "name": "account_id", "norm_name": "accountid" }, { "desc": "transaction id", "is_derived": false, "name": "trans_id", "norm_name": "transid" }, { "desc": "date of transaction", "is_derived": false, "name": "date", "norm_name": "date" }, { "desc": "mode of transaction", "is_derived": false, "name": "operation", "norm_name": "operation" } ] }, "dprs": [ "Collect data that will allow queries on credit card transactions, client information, and loan details. It should include details about transaction history, client demographics, and loan status, as well as information about the bank and account details. It should also include data to understand client behavior, loan performance, and transaction patterns.", "Collect data that will allow queries on financial information, including credit card transactions, loan details, and client demographics. It should provide insights into account activities, repayment status, and transaction modes. It should also cover geographical locations and various account metrics, allowing for a comprehensive understanding of financial trends and patterns.", "Collect data that will allow queries on credit card transactions, client information, and loan details. It should include details about transaction history, client demographics, and account status, as well as information about the bank and district locations. It should also be used to understand credit card usage, loan performance, and client behavior." ], "relevant_ques_in_bird": [ "How many credit card withdrawals were recorded after 1995?", "List all the clients' IDs whose junior credit cards were issued after 1996.", "Among the accounts who have loan validity more than 24 months, list out the accounts that have the lowest approved amount and have account opening date before 1997.", "Please list the account types that are not eligible for loans, and the average income of residents in the district where the account is located exceeds $8000 but is no more than $9000.", "Provide the account ID, district and region for loan amount greater than USD300,000.", "List all the withdrawals in cash transactions that the client with the id 3356 makes.", "Please provide the IDs of the 3 female clients with the largest loans.", "List all ID and district for clients that can only have the right to issue permanent orders or apply for loans.", "Provide the IDs and age of the client with high level credit card, which is eligible for loans.", "List the loan ID, district and average salary for loan with duration of 60 months." ], "topics_from_dp_tables": [ "financial management", "banking and finance", "financial services", "personal finance", "account management", "loans and credit" ], "topics_from_dpr": [ "client demographics", "client information", "banking information", "geographical locations", "transaction history", "financial trends", "loan details", "account status", "credit card transactions" ] }, "formula_1": { "dp_tables": { "circuits": [ { "desc": "url", "is_derived": false, "name": "url", "norm_name": "url" }, { "desc": "unique identification number of the circuit ", "is_derived": false, "name": "circuitid", "norm_name": "circuitid" }, { "desc": "full name of circuit", "is_derived": false, "name": "name", "norm_name": "name" } ], "constructors": [ { "desc": "nationality of the constructor", "is_derived": false, "name": "nationality", "norm_name": "nationality" }, { "desc": "the unique identification number identifying constructors ", "is_derived": false, "name": "constructorid", "norm_name": "constructorid" } ], "drivers": [ { "desc": "nationality of drivers", "is_derived": false, "name": "nationality", "norm_name": "nationality" }, { "desc": "Full name of the driver", "is_derived": true, "name": "fullname", "norm_name": "fullname", "provenance": "SELECT CONCAT(forename, ' ', surname) AS \"Full Name\" FROM drivers;", "provenance_cols": { "drivers": [ "forename", "surname" ] } }, { "desc": "The number of accidents the driver has been involved in, replace NULL values with 0.", "is_derived": true, "name": "num_accidents", "norm_name": "numaccidents", "provenance": "SELECT driverid, COALESCE(SUM(CASE WHEN statusid IN (SELECT statusid FROM status WHERE status LIKE '%Accident%') THEN 1 ELSE 0 END), 0) AS accidents FROM results GROUP BY driverid;", "provenance_cols": { "results": [ "driverid" ], "status": [ "statusid", "status" ] } }, { "desc": "The number of winnings by the driver, replace NULL values with 0.", "is_derived": true, "name": "num_winnings", "norm_name": "numwinnings", "provenance": "SELECT d.driverid, d.forename, d.surname, COALESCE(SUM(CASE WHEN r.position = 1 THEN 1 ELSE 0 END), 0) AS wins FROM drivers d LEFT JOIN results r ON d.driverid = r.driverid GROUP BY d.driverid, d.forename, d.surname ORDER BY wins DESC;", "provenance_cols": { "drivers": [ "driverid", "forename", "surname" ], "results": [ "position", "driverid" ] } }, { "desc": "The points recorded for the driver's first race event.", "is_derived": true, "name": "points_recorded_for_first_race", "norm_name": "pointsrecordedforfirstrace", "provenance": "SELECT T1.points FROM results AS T1 INNER JOIN driverstandings AS T2 ON T1.raceid = T2.raceid AND T1.driverid = T2.driverid WHERE T2.position = 1;", "provenance_cols": { "driverstandings": [ "raceid", "driverid", "position" ], "results": [ "points", "raceid", "driverid" ] } }, { "desc": "The average duration of the pit stops the driver has made.", "is_derived": true, "name": "avg_pit_stop_duration", "norm_name": "avgpitstopduration", "provenance": "SELECT AVG(milliseconds) FROM pitstops WHERE driverid = (SELECT driverid FROM drivers WHERE forename = 'Driver Forename' AND surname = 'Driver Surname');", "provenance_cols": { "drivers": [ "forename", "surname" ], "pitstops": [ "milliseconds", "driverid" ] } }, { "desc": "the unique identification number identifying each driver", "is_derived": false, "name": "driverid", "norm_name": "driverid" }, { "desc": "driver reference name ", "is_derived": false, "name": "driverref", "norm_name": "driverref" }, { "desc": "surname", "is_derived": false, "name": "surname", "norm_name": "surname" }, { "desc": "forename", "is_derived": false, "name": "forename", "norm_name": "forename" }, { "desc": "date of birth", "is_derived": false, "name": "dob", "norm_name": "dob" } ], "driverstandings": [ { "desc": "id number identifying which drivers ", "is_derived": false, "name": "driverid", "norm_name": "driverid" }, { "desc": "wins", "is_derived": false, "name": "wins", "norm_name": "wins" }, { "desc": "how many points acquired in each race", "is_derived": false, "name": "points", "norm_name": "points" }, { "desc": "id number identifying which races", "is_derived": false, "name": "raceid", "norm_name": "raceid" }, { "desc": "the unique identification number identifying driver standing records ", "is_derived": false, "name": "driverstandingsid", "norm_name": "driverstandingsid" } ], "qualifying": [ { "desc": "the identification number identifying each driver ", "is_derived": false, "name": "driverid", "norm_name": "driverid" }, { "desc": "time in qualifying 1", "is_derived": false, "name": "q1", "norm_name": "q1" }, { "desc": "the identification number identifying each race", "is_derived": false, "name": "raceid", "norm_name": "raceid" }, { "desc": "time in qualifying 2", "is_derived": false, "name": "q2", "norm_name": "q2" }, { "desc": "the unique identification number identifying qualifying ", "is_derived": false, "name": "qualifyid", "norm_name": "qualifyid" } ], "races": [ { "desc": "circuit Id ", "is_derived": false, "name": "circuitid", "norm_name": "circuitid" }, { "desc": "year", "is_derived": false, "name": "year", "norm_name": "year" }, { "desc": "the unique identification number identifying the race", "is_derived": false, "name": "raceid", "norm_name": "raceid" }, { "desc": "duration time", "is_derived": false, "name": "date", "norm_name": "date" } ], "results": [ { "desc": "the identification number identifying the driver ", "is_derived": false, "name": "driverid", "norm_name": "driverid" }, { "desc": "finish time", "is_derived": false, "name": "time", "norm_name": "time" }, { "desc": "the identification number identifying the race", "is_derived": false, "name": "raceid", "norm_name": "raceid" }, { "desc": "fastest Lap Time", "is_derived": false, "name": "fastestlaptime", "norm_name": "fastestlaptime" }, { "desc": "the unique identification number identifying race result ", "is_derived": false, "name": "resultid", "norm_name": "resultid" } ], "seasons": [ { "desc": "website link of season race introduction", "is_derived": false, "name": "url", "norm_name": "url" }, { "desc": "the unique identification number identifying the race", "is_derived": false, "name": "year", "norm_name": "year" } ] }, "dprs": [ "Collect data that will allow queries on driver performance in races, including qualifying times, finishing positions, and points acquired. It should also provide information on driver details, circuit locations, dates and race events. The data should support examination of factors like speed, consistency, and accidents, allowing for insights into driver abilities and race outcomes.", "Collect data that will allow queries on driver performance in races, including qualifying times, finishing positions, and points acquired. It should also provide information about the drivers themselves, such as their names, nationalities, and dates of birth. It should include details about the races, like locations, dates, and durations.", "Collect data that will allow queries on driver performance, including race results, qualifying times, and personal details. It should also include information about the circuits, such as location, dates and layout. The data should be used to evaluate driver skills, track performance, and team success." ], "relevant_ques_in_bird": [ "Where can I find the information about the races held on Sepang International Circuit?", "Show me the season page of year when the race No. 901 took place.", "Please list the reference names of the drivers who are eliminated in the first period in race number 20.", "What is the surname of the driver with the best lap time in race number 19 in the second qualifying period?", "For the drivers who took part in the race in 1983/7/16, what's their race completion rate?", "Which driver has the fastest lap time? Please give their forenames and surnames.", "How many wins was achieved by the oldest racer? Indicate his/her full name.", "State the driver with the most points scored. Find his full name with that points.", "Name the driver with the most winning. Mention his nationality and what is his maximum point scores.", "Please calculate the race completion percentage of Japanese drivers from 2007 to 2009." ], "topics_from_dp_tables": [ "motor sports", "auto racing", "racing drivers", "grand prix", "racing circuits", "formula one" ], "topics_from_dpr": [ "driver details", "circuit information", "racing statistics", "driver performance", "race events" ] }, "hockey": { "dp_tables": { "goalies": [ { "desc": "The defensive success rate (in percentage) of the goalie in the postseason of 2011", "is_derived": true, "name": "defensive_success_rate_in_the_postseason_of_2011", "norm_name": "defensivesuccessrateinthepostseasonof2011", "provenance": "SELECT CAST((postw / (postw + postl + postt)) * 100 AS REAL) AS defensive_success_rate FROM goalies WHERE year = 2011 AND postgp IS NOT NULL;", "provenance_cols": { "goalies": [ "postw", "postl", "postt", "postgp" ] } }, { "desc": "Set to 1 if the goalie has more lost than won games, otherwise, set to 0", "is_derived": true, "name": "has_more_lost_than_won_games", "norm_name": "hasmorelostthanwongames", "provenance": "SELECT playerid, CASE WHEN l > w THEN 1 ELSE 0 END AS result FROM goaliessc;", "provenance_cols": { "goaliessc": [ "playerid", "l", "w" ] } }, { "desc": "The number of seasons the goalie has played, replace NULL values with 0.", "is_derived": true, "name": "number_of_seasons_played", "norm_name": "numberofseasonsplayed", "provenance": "SELECT COUNT(DISTINCT year) FROM goalies WHERE playerid = ?;", "provenance_cols": { "goalies": [ "playerid" ] } }, { "desc": "Set to 1 if the goalie has played 5000 minutes in all the seasons played, otherwise, set to 0", "is_derived": true, "name": "played_5000_minutes_in_the_all_the_season_played", "norm_name": "played5000minutesinthealltheseasonplayed", "provenance": "SELECT playerid, CASE WHEN SUM(min) >= 5000 THEN 1 ELSE 0 END AS has_played_5000_minutes FROM goalies GROUP BY playerid", "provenance_cols": { "goalies": [ "playerid" ] } }, { "desc": "Unique identifier for the goalie.", "is_derived": false, "name": "playerid", "norm_name": "playerid" }, { "desc": "The total number of goals against by the goalie, replace NULL values with 0.", "is_derived": true, "name": "total_goal_againsts", "norm_name": "totalgoalagainsts", "provenance": "SELECT COALESCE(SUM(ga), 0) AS total_goals_against FROM goalies;", "provenance_cols": { "goalies": [ "ga" ] } }, { "desc": "Shots against", "is_derived": false, "name": "sa", "norm_name": "sa" }, { "desc": "league abbreviated name", "is_derived": false, "name": "lgid", "norm_name": "lgid" }, { "desc": "Empty net goals", "is_derived": false, "name": "eng", "norm_name": "eng" }, { "desc": "year", "is_derived": false, "name": "year", "norm_name": "year" }, { "desc": "Goals against", "is_derived": false, "name": "ga", "norm_name": "ga" }, { "desc": "Games played", "is_derived": false, "name": "gp", "norm_name": "gp" }, { "desc": "wins", "is_derived": false, "name": "w", "norm_name": "w" } ], "master": [ { "desc": "Height of the goalie.", "is_derived": false, "name": "height", "norm_name": "height" }, { "desc": "Given name of the goalie.", "is_derived": false, "name": "namegiven", "norm_name": "namegiven" }, { "desc": "id number identifying the player", "is_derived": false, "name": "playerid", "norm_name": "playerid" }, { "desc": "birth Country", "is_derived": false, "name": "birthcountry", "norm_name": "birthcountry" }, { "desc": "birth Year", "is_derived": false, "name": "birthyear", "norm_name": "birthyear" }, { "desc": "First WHA season", "is_derived": false, "name": "firstwha", "norm_name": "firstwha" }, { "desc": "First NHL season", "is_derived": false, "name": "firstnhl", "norm_name": "firstnhl" }, { "desc": "Nickname ", "is_derived": false, "name": "namenick", "norm_name": "namenick" }, { "desc": "Last NHL season", "is_derived": false, "name": "lastnhl", "norm_name": "lastnhl" }, { "desc": "first name", "is_derived": false, "name": "firstname", "norm_name": "firstname" }, { "desc": "last name", "is_derived": false, "name": "lastname", "norm_name": "lastname" }, { "desc": "Shooting hand (or catching hand for goalies)", "is_derived": false, "name": "shootcatch", "norm_name": "shootcatch" } ], "scoring": [ { "desc": "player ID", "is_derived": false, "name": "playerid", "norm_name": "playerid" }, { "desc": "team id", "is_derived": false, "name": "tmid", "norm_name": "tmid" }, { "desc": "play year", "is_derived": false, "name": "year", "norm_name": "year" }, { "desc": "Plus / minus", "is_derived": false, "name": "+/-", "norm_name": "+/-" } ], "teams": [ { "desc": "The highest total points the team got in a year.", "is_derived": true, "name": "highest_total_points_got_in_a_year", "norm_name": "highesttotalpointsgotinayear", "provenance": "SELECT MAX(pts) FROM teams;", "provenance_cols": { "teams": [ "pts" ] } }, { "desc": "The number of bench minor penalties the team has, replace NULL values with 0.", "is_derived": true, "name": "num_bench_minor_penalties", "norm_name": "numbenchminorpenalties", "provenance": "SELECT COALESCE(SUM(benchminor), 0) FROM teamspost;", "provenance_cols": { "teamspost": [ "benchminor" ] } }, { "desc": "The number of ties the team has, replace NULL values with 0.", "is_derived": true, "name": "num_ties", "norm_name": "numties", "provenance": "SELECT COALESCE(SUM(t), 0) AS number_of_ties FROM teams;", "provenance_cols": { "teams": [ "t" ] } }, { "desc": "The number of victories the team has, replace NULL values with 0.", "is_derived": true, "name": "num_victories", "norm_name": "numvictories", "provenance": "SELECT COALESCE(w, 0) AS victories FROM teams;", "provenance_cols": { "teams": [ "w" ] } }, { "desc": "The power play percentage of the team in 2011.", "is_derived": true, "name": "power_play_percentage_in_2011", "norm_name": "powerplaypercentagein2011", "provenance": "SELECT CAST(ppg AS REAL) / ppc FROM teams WHERE year = 2011;", "provenance_cols": { "teams": [ "ppg" ] } }, { "desc": "Unique identifier for the team.", "is_derived": true, "name": "team_id", "norm_name": "teamid", "provenance": "SELECT tmid FROM teams GROUP BY tmid;", "provenance_cols": { "teams": [ "tmid" ] } }, { "desc": "team ID", "is_derived": false, "name": "tmid", "norm_name": "tmid" } ] }, "dprs": [ "Collect data that will allow queries on hockey player personal details, performance, including goals, wins, and defensive success rates. It should also provide information on player attributes like position, height, and weight. Additionally, it should track award information and postseason performance. It should be used to evaluate player and goalie effectiveness.", "Collect data that will allow queries on hockey personal details, player performance, including awards, physical characteristics, and game statistics, allowing for evaluation of goalies' careers and postseason success.", "Collect data that will allow queries on hockey player personal details, performance, including awards, goals, and wins, as well as defensive success rates and game outcomes. It should also provide information on player attributes like position, height, and weight. The data should support evaluation of player careers and postseason performance." ], "relevant_ques_in_bird": [ "Please list the years in which the NHL League had shots recorded while the goalie was on the ice.", "Which country produced the most number of hockey players? Identify which year was most of the hockey players are born.", "Who are the players played both in NHL and WHA. List the given name and first year they were in NHL and first year in WHA.", "State the nick name of the tallest player? If the player had left NHL, mention the last season he was with NHL.", "Name the goaltenders who had played in both PCHA and NHL league.", "Name all goalies with 10 or more empty net goals. Name the players and season where he played.", "State the goalie who has the lowest percentage of goals against among all the shots against recorded. Name the players and season where he played.", "For all the goalies born in year 1987, who are good in both right hand and left hand? Calculate his percentage of winning for every season he played.", "How long has the NHL player been playing during the year when he recorded the least number of times being on the ice when a goal is scored for the team versus against the team? Indicate his full name." ], "topics_from_dp_tables": [ "ice hockey", "hockey players", "national hockey league", "hockey statistics", "hockey teams" ], "topics_from_dpr": [ "career statistics", "award and postseason information", "hockey player attributes", "goalie evaluation", "player performance metrics" ] }, "legislator": { "dp_tables": { "current": [ { "desc": "The unique identifier of the legislator.", "is_derived": false, "name": "bioguide_id", "norm_name": "bioguideid" }, { "desc": "The full name of the legislator.", "is_derived": true, "name": "full_name", "norm_name": "fullname", "provenance": "SELECT official_full_name FROM current;", "provenance_cols": { "current": [ "official_full_name" ] } }, { "desc": "The gender of the legislator.", "is_derived": false, "name": "gender_bio", "norm_name": "genderbio" }, { "desc": "Set to 1 if the current legislator has a nickname, 0 otherwise.", "is_derived": true, "name": "has_a_nickname", "norm_name": "hasanickname", "provenance": "SELECT CASE WHEN nickname_name IS NOT NULL AND nickname_name <> '' THEN 1 ELSE 0 END AS has_nickname FROM current;", "provenance_cols": { "current": [ "nickname_name" ] } }, { "desc": "Set to 1 if the current legislator has served in Maine, 0 otherwise.", "is_derived": true, "name": "has_served_in_Maine", "norm_name": "hasservedinmaine", "provenance": "SELECT CASE WHEN T2.state = 'ME' THEN 1 ELSE 0 END FROM current AS T1 LEFT JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide;", "provenance_cols": { "current": [ "bioguide_id" ], "current-terms": [ "state", "bioguide" ] } }, { "desc": "Set to 1 if the current legislator is Jewish but does not have a Facebook account, 0 otherwise.", "is_derived": true, "name": "is_Jewish_but_does_not_have_facebook", "norm_name": "isjewishbutdoesnothavefacebook", "provenance": "SELECT CASE WHEN c.religion_bio = 'Jewish' AND sm.facebook IS NULL THEN 1 ELSE 0 END FROM current c LEFT JOIN `social-media` sm ON c.bioguide_id = sm.bioguide;", "provenance_cols": { "current": [ "religion_bio", "bioguide_id" ], "social-media": [ "facebook", "bioguide" ] } }, { "desc": "Set to 1 if the current legislator is male but is not a senator, 0 otherwise.", "is_derived": true, "name": "is_male_but_is_not_senator", "norm_name": "ismalebutisnotsenator", "provenance": "SELECT CASE WHEN c.gender_bio = 'M' AND ct.chamber != 'senate' THEN 1 ELSE 0 END FROM current c JOIN `current-terms` ct ON c.bioguide_id = ct.bioguide;", "provenance_cols": { "current": [ "gender_bio", "bioguide_id" ], "current-terms": [ "chamber", "bioguide" ] } } ], "historical": [ { "desc": "gender of the legislator", "is_derived": false, "name": "gender_bio", "norm_name": "genderbio" }, { "desc": "The alphanumeric ID for this legislator ", "is_derived": false, "name": "bioguide_id", "norm_name": "bioguideid" }, { "desc": "The legislator's birthday,", "is_derived": false, "name": "birthday_bio", "norm_name": "birthdaybio" }, { "desc": "first name of the legislator", "is_derived": false, "name": "first_name", "norm_name": "firstname" }, { "desc": "google entity id", "is_derived": false, "name": "google_entity_id_id", "norm_name": "googleentityidid" }, { "desc": "last name of the legislator", "is_derived": false, "name": "last_name", "norm_name": "lastname" }, { "desc": "The ballotpedia.org page name for the person (spaces are given as spaces, not underscores).", "is_derived": false, "name": "ballotpedia_id", "norm_name": "ballotpediaid" }, { "desc": "The legislator's religion.", "is_derived": false, "name": "religion_bio", "norm_name": "religionbio" }, { "desc": " A list of IDs for this legislator in Federal Election Commission data.", "is_derived": false, "name": "fec_id", "norm_name": "fecid" } ] }, "dprs": [ "Collect data that will allow queries on legislator characteristics, including demographics and service history. It should provide information on legislators' identities, backgrounds, and online presence, allowing for insights into their representation and activities. It should also support examination of various aspects of legislators' profiles and careers.", "Collect data that will allow queries on legislator characteristics, including demographic information and service history. It should provide details about legislators' identities, backgrounds, and social media presence, as well as their roles and tenure. The data should also be used to explore trends and patterns among legislators, such as representation and diversity.", "Collect data that will allow queries on legislator characteristics, including demographics and service history. It should provide information on legislator identities, backgrounds, and social media presence, allowing for insights into their profiles and experiences. It should also support examination of various aspects of legislators' lives and careers." ], "relevant_ques_in_bird": [ "How many females were members of the past legislators?", "How many historical legislators were born in 1973?", "How many legislators were born in 1736?", "What is the google entity ID of Benjamin Hawkins?", "What is the name of the legislator with the ID of W000059?", "Does Thomas Carnes have an account on ballotpedia.org?", "Which legislators are woman?", "How many Catholic legislators do not have an account on ballotpedia.org?", "What is the full name of the oldest legislator?", "What are the full names of the non-google female entity legislators that have not been registered in Federal Election Commission data?" ], "topics_from_dp_tables": [ "government", "politics", "politicians", "us congress", "senate", "maine state legislature", "legislators", "representatives", "legislative bodies", "house of representatives", "elections" ], "topics_from_dpr": [ "representation and diversity", "legislator demographics", "legislator profiles", "service history", "online presence" ] }, "mondial_geo": { "dp_tables": { "city": [ { "desc": "name of city", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": "population of the city", "is_derived": false, "name": "population", "norm_name": "population" } ], "continent": [ { "desc": "total area of the continent.", "is_derived": false, "name": "area", "norm_name": "area" }, { "desc": "name of the continent", "is_derived": false, "name": "name", "norm_name": "name" } ], "country": [ { "desc": "The area of the country.", "is_derived": false, "name": "area", "norm_name": "area" }, { "desc": "Set to 1 if the country has over 1 organizations and an inflation rate of over 3, otherwise, set to 0.", "is_derived": true, "name": "has_over_1_organizations_and_an_inflation_rate_of_over_3_per", "norm_name": "hasover1organizationsandaninflationrateofover3per", "provenance": "SELECT c.code, CASE WHEN (SELECT COUNT(DISTINCT o.abbreviation) FROM organization o WHERE o.country = c.code) > 1 AND (SELECT e.inflation FROM economy e WHERE e.country = c.code) > 3 THEN 1 ELSE 0 END AS result FROM country c", "provenance_cols": { "country": [ "code" ], "economy": [ "inflation", "country" ], "organization": [ "abbreviation", "country" ] } }, { "desc": "The name of the country.", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": "The number of ethnic groups in the country, replace NULL values with 0.", "is_derived": true, "name": "num_ethnic_groups", "norm_name": "numethnicgroups", "provenance": "SELECT COUNT(name) as number_of_ethnic_groups FROM ethnicgroup WHERE country = 'country_code' AND name IS NOT NULL;", "provenance_cols": { "ethnicgroup": [ "name", "country" ] } }, { "desc": "The number of languages spoken in the country, replace NULL values with 0.", "is_derived": true, "name": "num_languages_spoken", "norm_name": "numlanguagesspoken", "provenance": "SELECT country, COUNT(name) AS num_languages FROM language GROUP BY country;", "provenance_cols": { "language": [ "country", "name" ] } }, { "desc": "The number of neighbors of the country, replace NULL values with 0.", "is_derived": true, "name": "num_neighbors", "norm_name": "numneighbors", "provenance": "SELECT country1, COUNT(country2) AS num_neighbors FROM borders GROUP BY country1 UNION SELECT country2, COUNT(country1) AS num_neighbors FROM borders GROUP BY country2;", "provenance_cols": { "borders": [ "country1", "country2" ] } }, { "desc": "the population number.", "is_derived": false, "name": "population", "norm_name": "population" }, { "desc": "The majority ethnic group in the country, with ties broken by the ascending order of the ethnic group name.", "is_derived": true, "name": "the_majority_ethnic_group", "norm_name": "themajorityethnicgroup", "provenance": "SELECT name FROM ethnicgroup WHERE percentage = ( SELECT MAX(percentage) FROM ethnicgroup ) ORDER BY name ASC LIMIT 1;", "provenance_cols": { "ethnicgroup": [ "name", "percentage" ] } }, { "desc": "country code", "is_derived": false, "name": "code", "norm_name": "code" }, { "desc": "the name of the capital,", "is_derived": false, "name": "capital", "norm_name": "capital" } ], "desert": [ { "desc": "the name of the desert", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": "the total area of the desert", "is_derived": false, "name": "area", "norm_name": "area" } ], "economy": [ { "desc": "gross domestic product", "is_derived": false, "name": "gdp", "norm_name": "gdp" }, { "desc": "the country code", "is_derived": false, "name": "country", "norm_name": "country" } ], "encompasses": [ { "desc": "the continent name.", "is_derived": false, "name": "continent", "norm_name": "continent" }, { "desc": "a country code", "is_derived": false, "name": "country", "norm_name": "country" } ], "ethnicgroup": [ { "desc": "name of the language", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": "the country code", "is_derived": false, "name": "country", "norm_name": "country" }, { "desc": "percentage of the language in this country.", "is_derived": false, "name": "percentage", "norm_name": "percentage" } ], "island": [ { "desc": "the name of the island", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": "the area of the island", "is_derived": false, "name": "area", "norm_name": "area" } ], "lake": [ { "desc": "the name of the lake", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": "the total area of the lake", "is_derived": false, "name": "area", "norm_name": "area" } ], "organization": [ { "desc": "the full name of the organization", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": " its abbreviation", "is_derived": false, "name": "abbreviation", "norm_name": "abbreviation" } ], "population": [ { "desc": "the country code", "is_derived": false, "name": "country", "norm_name": "country" }, { "desc": "population growth rate", "is_derived": false, "name": "population_growth", "norm_name": "populationgrowth" } ], "province": [ { "desc": "the population of the province", "is_derived": false, "name": "population", "norm_name": "population" }, { "desc": "the total area of the province,", "is_derived": false, "name": "area", "norm_name": "area" }, { "desc": "the name of the administrative division", "is_derived": false, "name": "name", "norm_name": "name" } ] }, "dprs": [ "Collect data that will allow queries on geographic and demographic characteristics of continents and countries, including area, population, ethnic groups, languages spoken, and economic indicators, allowing for insights into cultural and socioeconomic diversity.", "Collect data that will allow queries on geographic and demographic characteristics. It should include information about continents, countries, and cities, such as area, population, ethnic groups, and languages spoken. It should also cover economic aspects, like inflation rates and organizations, allowing for a comprehensive understanding of various regions and their attributes.", "Collect data that will allow queries on geographical and demographic characteristics of continents and countries, including area, population, ethnic groups, languages spoken, and economic indicators, allowing for insights into cultural and economic diversity." ], "relevant_ques_in_bird": [ "Please list the name of the countries with over 5 ethnic groups.", "In countries where there is more than one ethnic group, name the ethnic group with the greatest presence in each country and the country to which it corresponds.", "Provide the country with its full name which has the most ethnic group? List them all ethnic group together with its percentage.", "Among countries with more than 400,000 GDP, state its capital and population.", "List all countries with negative growth in population. State the country, population and growth.", "For the countries have the population north of a billion, which one has the lowest GDP? Give the full name of the country.", "Give the full names of the countries that are located in more than one continent.", "Among the countries with more than 3% population growth rate, state the country name in full along with its GDP.", "Please list the countries on the European Continent that have a population growth of more than 3%.", "Provide a full list of countries and its population with more than 70% of Chinese." ], "topics_from_dp_tables": [ "continental information", "lake information", "desert information", "population statistics", "geography", "organization information", "geographic features", "island information", "demographic data", "city information", "country information", "economic data", "ethnic groups" ], "topics_from_dpr": [ "cultural diversity", "geographical attributes", "demographic characteristics", "economic indicators", "population statistics", "socioeconomic data", "geographic information" ] }, "movie_3": { "dp_tables": { "category": [ { "desc": "name of the category", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": "unique id number identifying the category", "is_derived": false, "name": "category_id", "norm_name": "categoryid" } ], "customer": [ { "desc": "The average amount of money on a single film rental the customer has spent", "is_derived": true, "name": "avg_amount_of_money_spent_on_rental", "norm_name": "avgamountofmoneyspentonrental", "provenance": "SELECT AVG(T1.amount) FROM payment AS T1 JOIN rental AS T2 ON T1.rental_id = T2.rental_id", "provenance_cols": { "payment": [ "amount", "rental_id" ], "rental": [ "rental_id" ] } }, { "desc": "The unique identifier of the customer.", "is_derived": false, "name": "customer_id", "norm_name": "customerid" }, { "desc": "Email address of the customer", "is_derived": false, "name": "email", "norm_name": "email" }, { "desc": "The full name of the customer", "is_derived": true, "name": "full_name", "norm_name": "fullname", "provenance": "SELECT first_name, last_name FROM customer;", "provenance_cols": { "customer": [ "first_name", "last_name" ] } }, { "desc": "Set to 1 if the customer has rented the film with the highest replacement cost, 0 otherwise.", "is_derived": true, "name": "has_rented_the_film_with_the_highest_replacement_cost", "norm_name": "hasrentedthefilmwiththehighestreplacementcost", "provenance": "SELECT c.customer_id, CASE WHEN r.inventory_id IN ( SELECT i.inventory_id FROM inventory i JOIN film f ON i.film_id = f.film_id ORDER BY f.replacement_cost DESC LIMIT 1 ) THEN 1 ELSE 0 END AS has_rented_most_expensive FROM customer c JOIN rental r ON c.customer_id = r.customer_id", "provenance_cols": { "customer": [ "customer_id" ], "film": [ "film_id", "replacement_cost" ], "inventory": [ "inventory_id", "film_id" ], "rental": [ "inventory_id", "customer_id" ] } }, { "desc": "The number of films the customer has rented, replace NULL values with 0.", "is_derived": true, "name": "num_rented_films", "norm_name": "numrentedfilms", "provenance": "SELECT customer_id, COALESCE(COUNT(rental_id), 0) as num_rentals FROM rental GROUP BY customer_id;", "provenance_cols": { "rental": [ "customer_id", "rental_id" ] } }, { "desc": "The percentage of music films among all the films the customer has rented", "is_derived": true, "name": "per_music_film_among_all_rented_films", "norm_name": "permusicfilmamongallrentedfilms", "provenance": "SELECT CAST(SUM(CASE WHEN T3.name = 'Music' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.rental_id) AS music_percentage FROM rental AS T1 INNER JOIN inventory AS T2 ON T1.inventory_id = T2.inventory_id INNER JOIN film_category AS T4 ON T2.film_id = T4.film_id INNER JOIN category AS T3 ON T4.category_id = T3.category_id", "provenance_cols": { "category": [ "name", "category_id" ], "film_category": [ "film_id", "category_id" ], "inventory": [ "inventory_id", "film_id" ], "rental": [ "rental_id", "inventory_id" ] } }, { "desc": "Set to 1 if the total payments of the customer is greater than 70% of the average total payments of all customers, 0 otherwise.", "is_derived": true, "name": "total_payments_greater_than_70per_of_the_average_total_payments", "norm_name": "totalpaymentsgreaterthan70peroftheaveragetotalpayments", "provenance": "SELECT customer_id, CASE WHEN total_amount > (SELECT AVG(total_amount) * 0.7 FROM (SELECT customer_id, SUM(amount) AS total_amount FROM payment GROUP BY customer_id) AS subquery) THEN 1 ELSE 0 END AS result FROM (SELECT customer_id, SUM(amount) AS total_amount FROM payment GROUP BY customer_id) AS subquery;", "provenance_cols": { "payment": [ "customer_id", "amount" ] } }, { "desc": "First name of the customer", "is_derived": false, "name": "first_name", "norm_name": "firstname" }, { "desc": "Last name of the customer", "is_derived": false, "name": "last_name", "norm_name": "lastname" } ], "film": [ { "desc": "The unique identifier of the film.", "is_derived": false, "name": "film_id", "norm_name": "filmid" }, { "desc": "Set to 1 if the rental rate of the film is greater than 60% of the average rental rate of all listed films, 0 otherwise.", "is_derived": true, "name": "has_a_rental_rate_greater_than_the_60per_of_average_rental_rate_of_all_listed_films", "norm_name": "hasarentalrategreaterthanthe60perofaveragerentalrateofalllistedfilms", "provenance": "SELECT film_id, rental_rate, CASE WHEN rental_rate > (SELECT AVG(rental_rate) * 0.6 FROM film) THEN 1 ELSE 0 END AS result FROM film;", "provenance_cols": { "film": [ "film_id", "rental_rate" ] } }, { "desc": "Duration time of the film screening.", "is_derived": false, "name": "length", "norm_name": "length" }, { "desc": "The number of actors in the film, replace NULL values with 0.", "is_derived": true, "name": "num_actors", "norm_name": "numactors", "provenance": "SELECT film_id, COALESCE(COUNT(actor_id), 0) as num_actors FROM film_actor GROUP BY film_id;", "provenance_cols": { "film_actor": [ "film_id", "actor_id" ] } }, { "desc": "The rental revenue of the film, replace NULL values with 0.", "is_derived": true, "name": "rental_revenue", "norm_name": "rentalrevenue", "provenance": "SELECT COALESCE(SUM(p.amount), 0) AS rental_revenue FROM payment p JOIN rental r ON p.rental_id = r.rental_id JOIN inventory i ON r.inventory_id = i.inventory_id JOIN film f ON i.film_id = f.film_id;", "provenance_cols": { "film": [ "film_id" ], "inventory": [ "inventory_id", "film_id" ], "payment": [ "amount", "rental_id" ], "rental": [ "rental_id", "inventory_id" ] } }, { "desc": "title of the film", "is_derived": false, "name": "title", "norm_name": "title" }, { "desc": "the rate of renting this film", "is_derived": false, "name": "rental_rate", "norm_name": "rentalrate" }, { "desc": "how long this film can be rent at once", "is_derived": false, "name": "rental_duration", "norm_name": "rentalduration" } ], "film_category": [ { "desc": "unique id number identifying the film", "is_derived": false, "name": "film_id", "norm_name": "filmid" }, { "desc": "id number identifying the category", "is_derived": false, "name": "category_id", "norm_name": "categoryid" } ], "film_text": [ { "desc": "title of the film", "is_derived": false, "name": "title", "norm_name": "title" }, { "desc": "unique id number identifying the film", "is_derived": false, "name": "film_id", "norm_name": "filmid" } ], "inventory": [ { "desc": "unique id number identifying the film", "is_derived": false, "name": "film_id", "norm_name": "filmid" }, { "desc": " id of the store", "is_derived": false, "name": "store_id", "norm_name": "storeid" }, { "desc": "unique id number identifying the inventory", "is_derived": false, "name": "inventory_id", "norm_name": "inventoryid" } ], "payment": [ { "desc": "unique id number identifying the customer", "is_derived": false, "name": "customer_id", "norm_name": "customerid" }, { "desc": "unique id number identifying the amount", "is_derived": false, "name": "amount", "norm_name": "amount" }, { "desc": "unique id number identifying the payment", "is_derived": false, "name": "payment_id", "norm_name": "paymentid" } ], "rental": [ { "desc": "id number identifying the customer", "is_derived": false, "name": "customer_id", "norm_name": "customerid" }, { "desc": "unique id number identifying the rental", "is_derived": false, "name": "rental_id", "norm_name": "rentalid" }, { "desc": "id number identifying the inventory", "is_derived": false, "name": "inventory_id", "norm_name": "inventoryid" } ], "staff": [ { "desc": "email", "is_derived": false, "name": "email", "norm_name": "email" }, { "desc": "unique id number identifying the staff", "is_derived": false, "name": "staff_id", "norm_name": "staffid" } ] }, "dprs": [ "Collect data that will allow queries on film rentals, including customer and staff information, film details, and rental metrics. It should provide insights into film categories, ratings, and revenue, as well as customer behavior and rental policies. It should also support evaluation of film performance and customer preferences.", "Collect data that will allow queries on film rentals, including customer and staff information, film details, and rental metrics. It should provide insights into film categories, ratings, and revenue, as well as customer rental behavior and staff performance. It should also support examination of film popularity, rental trends, and business operations.", "Collect data that will allow queries on film rentals, including customer and staff information, film details, and rental history. It should provide insights into film categories, ratings, and revenue, as well as customer rental behavior and preferences. It should also be used to understand film performance and customer trends." ], "relevant_ques_in_bird": [ "How many films have a rental rate of 0.99?", "What is the largest number of films rented per customer?", "List down all of the film IDs with highest rental duration.", "Name the movie with the highest rental revenue among the shortest films.", "List the store ID of the films with a rental rate greater than the 60% of average rental rate of all listed films.", "Determine the number of action movies available for rent.", "Please give the full name of the customer that have rented the most films.", "What is the full name of the customer who rented the highest number of movies of all time?", "Who is the customer with the largest payment for rental films?", "Identify the number of movies rented by Maria Miller.", "Please give the full name of the customer who had made the biggest amount of payment in one single film rental.", "Which film is rented for the most times by the customers? Please give its title.", "Calculate the total rental rate for animation film titles.", "What are the films that are least rented by the customers?", "List at least 10 films that the customers can rent for more than 5 days.", "Find and list the full name of customers who rented more than five types of movies.", "Find and list the full name of customers who rented more family movies than Sci-Fi movies." ], "topics_from_dp_tables": [ "movie reviews", "video rental", "movie rentals", "film and cinema", "home video", "cinema and film", "movie category", "entertainment and leisure", "movie database", "online movie rentals" ], "topics_from_dpr": [ "business operations", "revenue analysis", "film categories", "staff performance", "film rentals", "film popularity", "customer information", "rental metrics", "customer behavior" ] }, "movie_platform": { "dp_tables": { "lists": [ { "desc": "ID related to the user who created the list.", "is_derived": false, "name": "user_id", "norm_name": "userid" }, { "desc": "ID of the list on Mubi", "is_derived": false, "name": "list_id", "norm_name": "listid" }, { "desc": "Number of movies added to the list", "is_derived": false, "name": "list_movie_number", "norm_name": "listmovienumber" } ], "lists_users": [ { "desc": "The average number of followers of the lists created by the user", "is_derived": true, "name": "average_followers_of_the_lists_created", "norm_name": "averagefollowersofthelistscreated", "provenance": "SELECT AVG(T1.list_followers) FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id;", "provenance_cols": { "lists": [ "list_followers", "list_id", "user_id" ], "lists_users": [ "list_id", "user_id" ] } }, { "desc": "ID related to the user who created the list.", "is_derived": false, "name": "user_id", "norm_name": "userid" }, { "desc": "The description of the list with the most followers created by the user, with ties broken by the descending order of the list description", "is_derived": true, "name": "description_list_most_followers", "norm_name": "descriptionlistmostfollowers", "provenance": "SELECT list_description FROM lists WHERE list_followers = ( SELECT MAX(list_followers) FROM lists ) ORDER BY list_description DESC LIMIT 1;", "provenance_cols": { "lists": [ "list_description", "list_followers" ] } }, { "desc": "The title of the first list created by the user, with ties broken by the ascending order of the list title", "is_derived": true, "name": "first_list_created", "norm_name": "firstlistcreated", "provenance": "SELECT list_title FROM lists WHERE (user_id, list_creation_timestamp_utc) IN ( SELECT user_id, MIN(list_creation_timestamp_utc) FROM lists GROUP BY user_id ) ORDER BY list_title ASC LIMIT 1;", "provenance_cols": { "lists": [ "list_title", "user_id", "list_creation_timestamp_utc" ] } }, { "desc": "The title of the list with the most followers created by the user, with ties broken by the ascending order of the list title", "is_derived": true, "name": "list_title_most_followers", "norm_name": "listtitlemostfollowers", "provenance": "SELECT list_title FROM lists WHERE list_followers = ( SELECT MAX(list_followers) FROM lists ) ORDER BY list_title ASC LIMIT 1;", "provenance_cols": { "lists": [ "list_title", "list_followers" ] } }, { "desc": "User profile image URL on Mubi", "is_derived": false, "name": "user_avatar_image_url", "norm_name": "useravatarimageurl" }, { "desc": "ID of the list on Mubi", "is_derived": false, "name": "list_id", "norm_name": "listid" } ], "movies": [ { "desc": "The average rating score of the most popular movie directed by the director, if there are multiple movies with the same popularity, rank them by the descending order of the movie title and take the first one", "is_derived": true, "name": "average_rating_score_of_most_popular_movie", "norm_name": "averageratingscoreofmostpopularmovie", "provenance": "SELECT AVG(T1.rating_score) FROM ratings AS T1 JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.director_name = (SELECT director_name FROM movies GROUP BY director_name ORDER BY COUNT(movie_id) DESC, director_name DESC LIMIT 1) AND T2.movie_title = (SELECT movie_title FROM movies WHERE director_name = (SELECT director_name FROM movies GROUP BY director_name ORDER BY COUNT(movie_id) DESC, director_name DESC LIMIT 1) ORDER BY movie_popularity DESC, movie_title DESC LIMIT 1)", "provenance_cols": { "movies": [ "movie_id", "director_name", "director_name", "movie_title", "movie_popularity" ], "ratings": [ "rating_score", "movie_id", "movie_id" ] } }, { "desc": "The average rating score of the movie", "is_derived": true, "name": "avg_rating_score", "norm_name": "avgratingscore", "provenance": "SELECT AVG(rating_score) FROM ratings;", "provenance_cols": { "ratings": [ "rating_score" ] } }, { "desc": "The unique identifier of the director", "is_derived": false, "name": "director_id", "norm_name": "directorid" }, { "desc": "The name of the director", "is_derived": false, "name": "director_name", "norm_name": "directorname" }, { "desc": "URL to the director page on Mubi", "is_derived": false, "name": "director_url", "norm_name": "directorurl" }, { "desc": "Set to 1 if the director has directed more than 10 movies between 1960 and 1985, 0 otherwise", "is_derived": true, "name": "has_more_than_10_movies_1960_1985", "norm_name": "hasmorethan10movies19601985", "provenance": "SELECT director_id, CASE WHEN COUNT(movie_id) > 10 THEN 1 ELSE 0 END AS has_directed_more_than_10_movies FROM movies WHERE movie_release_year BETWEEN 1960 AND 1985 GROUP BY director_id", "provenance_cols": { "movies": [ "director_id", "movie_id", "movie_release_year" ] } }, { "desc": "The latest movie the user rated, with ties broken by the ascending order of the movie title", "is_derived": true, "name": "latest_rated_movie", "norm_name": "latestratedmovie", "provenance": "SELECT m.movie_title, r.rating_timestamp_utc FROM ratings r JOIN movies m ON r.movie_id = m.movie_id WHERE r.user_id = ? ORDER BY r.rating_timestamp_utc DESC, m.movie_title ASC LIMIT 1;", "provenance_cols": { "movies": [ "movie_title", "movie_id" ], "ratings": [ "rating_timestamp_utc", "movie_id", "user_id" ] } }, { "desc": "The unique identifier of the movie", "is_derived": false, "name": "movie_id", "norm_name": "movieid" }, { "desc": "The title of the movie", "is_derived": false, "name": "movie_title", "norm_name": "movietitle" }, { "desc": "URL to the movie page on Mubi", "is_derived": false, "name": "movie_url", "norm_name": "movieurl" }, { "desc": "The number of movies directed by the director in the 1970s, replace NULL values with 0.", "is_derived": true, "name": "number_of_movies_directed_in_70s", "norm_name": "numberofmoviesdirectedin70s", "provenance": "SELECT director_name, COALESCE(COUNT(*), 0) AS num_movies FROM movies WHERE movie_release_year BETWEEN 1970 AND 1979 GROUP BY director_name;", "provenance_cols": { "movies": [ "director_name", "movie_release_year" ] } }, { "desc": "The percentage of the highest rating score the movie received", "is_derived": true, "name": "percentage_highest_rating_score", "norm_name": "percentagehighestratingscore", "provenance": "SELECT (MAX(rating_score) / 5.0) * 100 FROM ratings;", "provenance_cols": { "ratings": [ "rating_score" ] } }, { "desc": "The percentage of subscribers who rated the movie", "is_derived": true, "name": "percentage_subscribers_rated", "norm_name": "percentagesubscribersrated", "provenance": "SELECT (COUNT(CASE WHEN T1.user_subscriber = 1 THEN T1.user_id ELSE NULL END) * 1.0 / COUNT(T1.user_id)) * 100 AS percentage_of_subscribers FROM ratings_users T1 INNER JOIN ratings T2 ON T1.user_id = T2.user_id;", "provenance_cols": { "ratings": [ "user_id" ], "ratings_users": [ "user_subscriber", "user_id" ] } }, { "desc": "The title of the third movie directed by the director, with ties broken by the ascending order of the movie title", "is_derived": true, "name": "third_movie_directed", "norm_name": "thirdmoviedirected", "provenance": "SELECT movie_title FROM ( SELECT movie_title, ROW_NUMBER() OVER (PARTITION BY director_id ORDER BY movie_title) as row_num FROM movies ) AS subquery WHERE row_num = 3 ORDER BY movie_title LIMIT 1;", "provenance_cols": { "movies": [ "movie_title", "director_id" ] } }, { "desc": "The total number of critic comments on the movie, replace NULL values with 0.", "is_derived": true, "name": "total_critic_comments", "norm_name": "totalcriticcomments", "provenance": "SELECT COALESCE(SUM(critic_comments), 0) AS total_critic_comments FROM ratings;", "provenance_cols": { "ratings": [ "critic_comments" ] } }, { "desc": "The critic made by the user rating the movie that received the highest number of likes, with ties broken by the ascending order of the critic", "is_derived": true, "name": "critic_highest_number_likes", "norm_name": "critichighestnumberlikes", "provenance": "SELECT critic FROM ratings ORDER BY critic_likes DESC, critic ASC LIMIT 1;", "provenance_cols": { "ratings": [ "critic", "critic_likes" ] } }, { "desc": "Number of Mubi users who love this movie", "is_derived": false, "name": "movie_popularity", "norm_name": "moviepopularity" }, { "desc": "Release year of the movie", "is_derived": false, "name": "movie_release_year", "norm_name": "moviereleaseyear" } ], "ratings": [ { "desc": "The unique identifier of the movie", "is_derived": false, "name": "movie_id", "norm_name": "movieid" }, { "desc": "ID related to the user rating the movie", "is_derived": false, "name": "user_id", "norm_name": "userid" }, { "desc": "Rating score ranging from 1 (lowest) to 5 (highest)", "is_derived": false, "name": "rating_score", "norm_name": "ratingscore" }, { "desc": "Number of likes related to the critic made by the user rating the movie", "is_derived": false, "name": "critic_likes", "norm_name": "criticlikes" }, { "desc": "URL to the rating on Mubi", "is_derived": false, "name": "rating_url", "norm_name": "ratingurl" }, { "desc": "Critic made by the user rating the movie.", "is_derived": false, "name": "critic", "norm_name": "critic" } ] }, "dprs": [ "Collect data that will allow queries on user behavior and movie preferences on Mubi, including ratings, list creations, and interactions with critics and directors, providing insights into user engagement and movie popularity.", "Collect data that will allow queries on user behavior and movie ratings on Mubi, including list creation, ratings, and user interactions, as well as movie metadata such as titles, release years, and director information.", "Collect data that will allow queries on user behavior and movie ratings on Mubi, including list creation, movie preferences, and user interactions, allowing for insights into user demographics and movie popularity." ], "relevant_ques_in_bird": [ "What is the average number of Mubi users who love movies directed by Stanley Kubrick?", "Which of the films released in 2006 was the most popular among Mubi users?", "Which of the films directed by \u00c1lex de la Iclesia is the most popular among Mubi users?", "List all movies with the best rating score. State the movie title and number of Mubi user who loves the movie.", "What is the URL to the movie director page on Mubi of the director whose movie was critic by user 2452551 and was given 39 likes?", "What is the name of the movie whose critic received the highest amount of likes? Indicate the URL to the rating on Mubi.", "For all movies where users left a critic, find the movie name, user, rating and critics comments from the user.", "What is the average number of movies added to the lists of user 8516503? Give the user profile image URL on Mubi.", "What is the URL to the rating on Mubi made by user 45579900 for the movie \"The Vertical Ray of the Sun\" that received 20 likes?" ], "topics_from_dp_tables": [ "movie reviews", "movies and film", "online movie platforms", "movie directors", "film ratings", "movie lists", "user generated lists" ], "topics_from_dpr": [ "user behavior", "user demographics", "movie ratings", "movie metadata", "user engagement", "movie popularity", "movie preferences" ] }, "movies_4": { "dp_tables": { "country": [ { "desc": "the unique identifier of the country", "is_derived": false, "name": "country_id", "norm_name": "countryid" }, { "desc": "the name of the country", "is_derived": false, "name": "country_name", "norm_name": "countryname" } ], "genre": [ { "desc": "the genre", "is_derived": false, "name": "genre_name", "norm_name": "genrename" }, { "desc": "the unique identifier of the genre", "is_derived": false, "name": "genre_id", "norm_name": "genreid" } ], "language": [ { "desc": "the language name", "is_derived": false, "name": "language_name", "norm_name": "languagename" }, { "desc": "the unique identifier of the language", "is_derived": false, "name": "language_id", "norm_name": "languageid" } ], "movie": [ { "desc": "Unique identifier for the movie.", "is_derived": false, "name": "movie_id", "norm_name": "movieid" }, { "desc": "The status of the movie.", "is_derived": false, "name": "movie_status", "norm_name": "moviestatus" }, { "desc": "The number of crews that worked on the movie, replace NULL values with 0.", "is_derived": true, "name": "number_of_crews", "norm_name": "numberofcrews", "provenance": "SELECT COALESCE(COUNT(DISTINCT T1.person_id), 0) FROM movie_crew AS T1 JOIN movie AS T2 ON T1.movie_id = T2.movie_id WHERE T2.title = 'movie_title';", "provenance_cols": { "movie": [ "movie_id", "title" ], "movie_crew": [ "person_id", "movie_id" ] } }, { "desc": "The number of main characters in the movie, replace NULL values with 0.", "is_derived": true, "name": "number_of_main_characters", "norm_name": "numberofmaincharacters", "provenance": "SELECT COALESCE(COUNT(T1.character_name), 0) FROM movie_cast AS T1 INNER JOIN movie AS T2 ON T1.movie_id = T2.movie_id;", "provenance_cols": { "movie": [ "movie_id" ], "movie_cast": [ "character_name", "movie_id" ] } }, { "desc": "The number of production companies that produced the movie, replace NULL values with 0.", "is_derived": true, "name": "number_of_production_companies", "norm_name": "numberofproductioncompanies", "provenance": "SELECT movie_id, COUNT(company_id) AS num_production_companies FROM movie_company GROUP BY movie_id;", "provenance_cols": { "movie_company": [ "movie_id", "company_id" ] } }, { "desc": "The percentage of male characters in the movie.", "is_derived": true, "name": "percentage_of_male_characters", "norm_name": "percentageofmalecharacters", "provenance": "SELECT CAST(SUM(CASE WHEN T2.gender = 'Male' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.movie_id) FROM movie_cast T1 JOIN gender T2 ON T1.gender_id = T2.gender_id;", "provenance_cols": { "gender": [ "gender", "gender_id" ], "movie_cast": [ "movie_id", "gender_id" ] } }, { "desc": "The ratio between male and female cast members in the movie.", "is_derived": true, "name": "ratio_between_male_and_female_cast_members", "norm_name": "ratiobetweenmaleandfemalecastmembers", "provenance": "SELECT SUM(CASE WHEN T2.gender = 'Male' THEN 1 ELSE 0 END) AS male_count, SUM(CASE WHEN T2.gender = 'Female' THEN 1 ELSE 0 END) AS female_count, SUM(CASE WHEN T2.gender = 'Male' THEN 1.0 ELSE 0 END) / SUM(CASE WHEN T2.gender = 'Female' THEN 1.0 ELSE 0 END) AS male_to_female_ratio FROM movie_cast T1 JOIN gender T2 ON T1.gender_id = T2.gender_id", "provenance_cols": { "gender": [ "gender", "gender_id" ], "movie_cast": [ "gender_id" ] } }, { "desc": "The title of the movie.", "is_derived": false, "name": "title", "norm_name": "title" }, { "desc": "the release date of the movie", "is_derived": false, "name": "release_date", "norm_name": "releasedate" }, { "desc": "the revenue of the movie", "is_derived": false, "name": "revenue", "norm_name": "revenue" }, { "desc": "the popularity of the movie", "is_derived": false, "name": "popularity", "norm_name": "popularity" }, { "desc": "the runtime of the movie", "is_derived": false, "name": "runtime", "norm_name": "runtime" } ], "movie_cast": [ { "desc": "the id of the movie\nMaps to movie(movie_id)", "is_derived": false, "name": "movie_id", "norm_name": "movieid" }, { "desc": "the id of the person\nMaps to person(person_id)", "is_derived": false, "name": "person_id", "norm_name": "personid" } ], "movie_company": [ { "desc": "the id of the movie \nMaps to movie(movie_id)", "is_derived": false, "name": "movie_id", "norm_name": "movieid" }, { "desc": "the id of the company that produced the movie\nMaps to production_company(company_id)", "is_derived": false, "name": "company_id", "norm_name": "companyid" } ], "movie_crew": [ { "desc": "the id of the movie that the crew worked for\nMaps to movie(movie_id)", "is_derived": false, "name": "movie_id", "norm_name": "movieid" }, { "desc": "the id of the crew\nMaps to person(person_id)", "is_derived": false, "name": "person_id", "norm_name": "personid" } ], "movie_genres": [ { "desc": "the id of the movie \nMaps to movie(movie_id)", "is_derived": false, "name": "movie_id", "norm_name": "movieid" }, { "desc": "the id of the movie genre\nMaps to genre(genre_id)", "is_derived": false, "name": "genre_id", "norm_name": "genreid" } ], "movie_languages": [ { "desc": "the id of the movie \nMaps to movie(movie_id)", "is_derived": false, "name": "movie_id", "norm_name": "movieid" }, { "desc": "the id of the movie language\nMaps to language(language_id)", "is_derived": false, "name": "language_id", "norm_name": "languageid" } ], "person": [ { "desc": "Unique identifier for the person.", "is_derived": false, "name": "person_id", "norm_name": "personid" }, { "desc": "The name of the person", "is_derived": false, "name": "person_name", "norm_name": "personname" }, { "desc": "Set to 1 if the person worked as a crew member in the movies released between 1/01/1916 and 12/31/1925, otherwise, set it to 0", "is_derived": true, "name": "has_movie_between_19160101_19251231", "norm_name": "hasmoviebetween1916010119251231", "provenance": "SELECT p.person_id, p.person_name, CASE WHEN mc.movie_id IS NOT NULL THEN 1 ELSE 0 END AS worked_as_crew FROM person p LEFT JOIN movie_crew mc ON p.person_id = mc.person_id LEFT JOIN movie m ON mc.movie_id = m.movie_id WHERE (m.release_date BETWEEN '1916-01-01' AND '1925-12-31') AND mc.department_id = (SELECT department_id FROM department WHERE department_name = 'Crew');", "provenance_cols": { "department": [ "department_name" ], "movie": [ "movie_id", "release_date" ], "movie_crew": [ "movie_id", "person_id", "department_id", "department_id" ], "person": [ "person_id", "person_name" ] } }, { "desc": "The latest movie in which the person worked as a crew member, with ties broken by the ascending order of the movie title", "is_derived": true, "name": "lastest_movie", "norm_name": "lastestmovie", "provenance": "SELECT m.title, m.release_date FROM movie m JOIN movie_crew mc ON m.movie_id = mc.movie_id WHERE mc.person_id = ? ORDER BY m.release_date DESC, m.title ASC LIMIT 1;", "provenance_cols": { "movie": [ "title", "release_date", "movie_id" ], "movie_crew": [ "movie_id", "person_id" ] } }, { "desc": "Set to 1 if the person has worked as a 'Music Editor' in the movie, otherwise, set to 0", "is_derived": true, "name": "has_worked_as_a_music_editor", "norm_name": "hasworkedasamusiceditor", "provenance": "SELECT CASE WHEN job = 'Music Editor' THEN 1 ELSE 0 END FROM movie_crew;", "provenance_cols": { "movie_crew": [ "job" ] } }, { "desc": "The movie title with the highest average vote in which the person worked as a crew member, with ties broken by the descending order of the movie title", "is_derived": true, "name": "movie_with_the_highest_average_vote", "norm_name": "moviewiththehighestaveragevote", "provenance": "SELECT m.title, AVG(m.vote_average) as avg_vote FROM movie m JOIN movie_crew mc ON m.movie_id = mc.movie_id GROUP BY m.title ORDER BY avg_vote DESC, m.title DESC LIMIT 1;", "provenance_cols": { "movie": [ "title", "vote_average", "movie_id" ], "movie_crew": [ "movie_id" ] } }, { "desc": "The percentage of movies, in which the person worked as a crew member, that have a vote average over 5.0.", "is_derived": true, "name": "percentage_of_movie_vote_average_over_5", "norm_name": "percentageofmovievoteaverageover5", "provenance": "SELECT person_id, CAST( SUM(CASE WHEN vote_average > 5.0 THEN 1 ELSE 0 END) AS REAL ) / COUNT(movie_id) * 100 AS percentage FROM movie_crew JOIN movie ON movie_crew.movie_id = movie.movie_id GROUP BY person_id", "provenance_cols": { "movie": [ "vote_average", "movie_id" ], "movie_crew": [ "person_id", "movie_id", "movie_id" ] } } ], "production_company": [ { "desc": "The name of the production company.", "is_derived": false, "name": "company_name", "norm_name": "companyname" }, { "desc": "Unique identifier for the production company.", "is_derived": false, "name": "company_id", "norm_name": "companyid" } ], "production_country": [ { "desc": "the unique identifier of the movie", "is_derived": false, "name": "movie_id", "norm_name": "movieid" }, { "desc": "the id of the country", "is_derived": false, "name": "country_id", "norm_name": "countryid" } ] }, "dprs": [ "Collect data that will allow queries on movie characteristics, including production details, crew information, and cast demographics. It should provide insights into movie genres, languages, and revenue, as well as the role of companies and individuals in movie production. It should also cover aspects like character diversity and crew composition.", "Collect data that will allow queries on movie characteristics, including production details, crew information, and cast demographics. It should provide insights into genres, languages, and companies involved in movie production, as well as revenue and budget information. It should also include details about characters, such as gender and roles, allowing for examination of representation in films. Overall, it should offer a comprehensive view of the movie industry.", "Collect data that will allow queries on movie characteristics, including production details, cast information, and revenue. It should provide insights into genres, languages, and crew roles, as well as metrics for evaluating movie performance and diversity. It should also support examination of relationships between various factors, such as company involvement, character representation, and financial outcomes." ], "relevant_ques_in_bird": [ "Tell the number of movies made by Paramount Animation.", "List the names of the production companies that made at least 200 movies.", "Please list the titles of all the movie produced by production company \"Universal Pictures\".", "Write down the release date of the movies produced by Twentieth Century Fox Film Corporation.", "Work out the difference in revenues made between the English and Latin movies.", "Provide the average revenue of all the French movies.", "Provide the release date and language of the most popular movie.", "Provide the titles and revenues of the movies produced by the DreamWorks company.", "Provide the production companies of the movie that has over 35% average running time per movie in 2016.", "Give the genre and popularity of movies whose revenue is at least 120,000,000 between 2012 and 2015." ], "topics_from_dp_tables": [ "movie reviews", "box office", "entertainment industry", "movies and film", "movie industry", "movie genres", "cinema", "film production" ], "topics_from_dpr": [ "character diversity and representation", "crew and cast information", "movie production details", "revenue and budget analysis", "movie genres and languages" ] }, "professional_basketball": { "dp_tables": { "awards_coaches": [ { "desc": "id number of the coaches", "is_derived": false, "name": "coachid", "norm_name": "coachid" }, { "desc": "id of this row of data", "is_derived": false, "name": "id", "norm_name": "id" } ], "awards_players": [ { "desc": "ID number identifying the unique number of the player", "is_derived": false, "name": "playerid", "norm_name": "playerid" }, { "desc": "the time of this award", "is_derived": false, "name": "year", "norm_name": "year" } ], "coaches": [ { "desc": "The unique identifier of the coach.", "is_derived": false, "name": "coachid", "norm_name": "coachid" }, { "desc": "Set to 1 if the coach has won more than 50 games in 2000, 0 otherwise.", "is_derived": true, "name": "has_more_than_50_games_won_2000", "norm_name": "hasmorethan50gameswon2000", "provenance": "SELECT coachid, CASE WHEN SUM(won) > 50 THEN 1 ELSE 0 END AS won_more_than_50 FROM coaches WHERE year = 2000 GROUP BY coachid;", "provenance_cols": { "coaches": [ "coachid" ] } }, { "desc": "Set to 1 if the coach has more game lost than won from year 2000-2010, otherwise, set to 0.", "is_derived": true, "name": "lost_more_than_won_from_2000_to_2010", "norm_name": "lostmorethanwonfrom2000to2010", "provenance": "SELECT coachid, CASE WHEN SUM(lost) > SUM(won) THEN 1 ELSE 0 END AS result FROM coaches WHERE year BETWEEN 2000 AND 2010 GROUP BY coachid", "provenance_cols": { "coaches": [ "coachid", "lost", "won" ] } }, { "desc": "The number of games the coach has won, replace NULL values with 0.", "is_derived": true, "name": "num_of_won_games", "norm_name": "numofwongames", "provenance": "SELECT COALESCE(SUM(won), 0) AS total_wins FROM coaches;", "provenance_cols": { "coaches": [ "won" ] } }, { "desc": "Set to 1 if the coach has received both NBA and ABA awards from 1962 to 2011, 0 otherwise.", "is_derived": true, "name": "received_both_NBA_and_ABA_awards_1962_to_2011", "norm_name": "receivedbothnbaandabaawards1962to2011", "provenance": "SELECT coachid, CASE WHEN SUM(CASE WHEN lgid = 'NBA' THEN 1 ELSE 0 END) > 0 AND SUM(CASE WHEN lgid = 'ABA' THEN 1 ELSE 0 END) > 0 THEN 1 ELSE 0 END AS received_both_awards FROM awards_coaches WHERE year BETWEEN 1962 AND 2011 GROUP BY coachid", "provenance_cols": { "awards_coaches": [ "coachid", "lgid" ] } }, { "desc": "Set to 1 if the coach has served more than 2 NBA teams, 0 otherwise.", "is_derived": true, "name": "served_more_than_2_NBA_teams", "norm_name": "servedmorethan2nbateams", "provenance": "SELECT coachid, CASE WHEN COUNT(DISTINCT tmid) > 2 THEN 1 ELSE 0 END AS result FROM coaches WHERE lgid = 'NBA' GROUP BY coachid", "provenance_cols": { "coaches": [ "coachid", "tmid", "lgid" ] } }, { "desc": "year", "is_derived": false, "name": "year", "norm_name": "year" }, { "desc": "team name", "is_derived": false, "name": "tmid", "norm_name": "tmid" }, { "desc": "the number of lost games", "is_derived": false, "name": "lost", "norm_name": "lost" }, { "desc": "the number of won games", "is_derived": false, "name": "won", "norm_name": "won" } ], "draft": [ { "desc": "ID number identifying the unique number of the player", "is_derived": false, "name": "playerid", "norm_name": "playerid" }, { "desc": "the first name of the player", "is_derived": false, "name": "firstname", "norm_name": "firstname" }, { "desc": "the last name of the player", "is_derived": false, "name": "lastname", "norm_name": "lastname" }, { "desc": "the unique number to determine one row of the data", "is_derived": false, "name": "id", "norm_name": "id" } ], "player_allstar": [ { "desc": "ID number identifying the unique number of the player", "is_derived": false, "name": "playerid", "norm_name": "playerid" }, { "desc": "offense rebounds", "is_derived": false, "name": "o_rebounds", "norm_name": "orebounds" }, { "desc": "total rebounds", "is_derived": false, "name": "rebounds", "norm_name": "rebounds" }, { "desc": "points", "is_derived": false, "name": "points", "norm_name": "points" }, { "desc": "the id number of the season", "is_derived": false, "name": "season_id", "norm_name": "seasonid" } ], "players": [ { "desc": "The country where the player was born.", "is_derived": false, "name": "birthcountry", "norm_name": "birthcountry" }, { "desc": "Set to 1 if the player attended a college in California and is an all-star player, 0 otherwise.", "is_derived": true, "name": "attended_California_college_and_is_an_all_star_player", "norm_name": "attendedcaliforniacollegeandisanallstarplayer", "provenance": "SELECT CASE WHEN p.college LIKE '%CA%' AND pa.playerid IS NOT NULL THEN 1 ELSE 0 END FROM players p LEFT JOIN player_allstar pa ON p.playerid = pa.playerid;", "provenance_cols": { "player_allstar": [ "playerid" ], "players": [ "college", "playerid" ] } }, { "desc": "The rate of field goals made by the player.", "is_derived": true, "name": "field_goal_made_rate", "norm_name": "fieldgoalmaderate", "provenance": "SELECT CAST(fg_made AS REAL) / fg_attempted FROM player_allstar;", "provenance_cols": { "player_allstar": [ "fg_made" ] } }, { "desc": "Set to 1 if the player is an all-star player and is higher than 75 inches, 0 otherwise.", "is_derived": true, "name": "is_all_star_player_and_higher_than_75_inch", "norm_name": "isallstarplayerandhigherthan75inch", "provenance": "SELECT CASE WHEN p.height > 75 AND pa.playerid IS NOT NULL THEN 1 ELSE 0 END FROM players p LEFT JOIN player_allstar pa ON p.playerid = pa.playerid;", "provenance_cols": { "player_allstar": [ "playerid" ], "players": [ "height", "playerid" ] } }, { "desc": "The number of fouls the player has committed, replace NULL values with 0.", "is_derived": true, "name": "num_fouls", "norm_name": "numfouls", "provenance": "SELECT COALESCE(SUM(pf), 0) AS total_fouls FROM players_teams;", "provenance_cols": { "players_teams": [ "pf" ] } }, { "desc": "The number of MVPs the player has won, replace NULL values with 0.", "is_derived": true, "name": "num_MVPs", "norm_name": "nummvps", "provenance": "SELECT playerid, COUNT(award) as num_mvp FROM awards_players WHERE award = 'MVP' GROUP BY playerid;", "provenance_cols": { "awards_players": [ "playerid", "award" ] } }, { "desc": "The unique identifier of the player.", "is_derived": false, "name": "playerid", "norm_name": "playerid" }, { "desc": "the last name of the player", "is_derived": false, "name": "lastname", "norm_name": "lastname" }, { "desc": "the position of the player", "is_derived": false, "name": "pos", "norm_name": "pos" }, { "desc": "the first name of the player", "is_derived": false, "name": "firstname", "norm_name": "firstname" } ], "players_teams": [ { "desc": "ID number identifying the unique number of the player", "is_derived": false, "name": "playerid", "norm_name": "playerid" }, { "desc": "team name", "is_derived": false, "name": "tmid", "norm_name": "tmid" }, { "desc": "lgid", "is_derived": false, "name": "lgid", "norm_name": "lgid" }, { "desc": "year", "is_derived": false, "name": "year", "norm_name": "year" }, { "desc": "steals", "is_derived": false, "name": "steals", "norm_name": "steals" }, { "desc": "total rebounds", "is_derived": false, "name": "rebounds", "norm_name": "rebounds" }, { "desc": "the unique number to identify this record", "is_derived": false, "name": "id", "norm_name": "id" } ], "teams": [ { "desc": "The name of the player.", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": "Set to 1 if the team has at least 3 all-star players, otherwise, set to 0.", "is_derived": true, "name": "has_at_least_3_all_star_players", "norm_name": "hasatleast3allstarplayers", "provenance": "SELECT pt.tmid, CASE WHEN COUNT(DISTINCT pa.playerid) >= 3 THEN 1 ELSE 0 END AS has_at_least_3_all_stars FROM players_teams pt LEFT JOIN player_allstar pa ON pt.playerid = pa.playerid GROUP BY pt.tmid", "provenance_cols": { "player_allstar": [ "playerid" ], "players_teams": [ "tmid", "playerid" ] } }, { "desc": "Set to 1 if the team has more home won than home lost more than 80% in any season, otherwise, set to 0.", "is_derived": true, "name": "has_more_home_won_than_lost_80_per", "norm_name": "hasmorehomewonthanlost80per", "provenance": "SELECT year, tmid, CASE WHEN homewon::numeric / (homewon + homelost) > 0.8 THEN 1 ELSE 0 END AS result FROM teams", "provenance_cols": { "teams": [ "year", "tmid", "homewon", "homelost" ] } }, { "desc": "The unique identifier of the team.", "is_derived": true, "name": "team_id", "norm_name": "teamid", "provenance": "SELECT tmid FROM teams", "provenance_cols": { "teams": [ "tmid" ] } }, { "desc": "Set to 1 if the team won more games in 2005 than in 2004, 0 otherwise.", "is_derived": true, "name": "win_more_in_2005_than_2004", "norm_name": "winmorein2005than2004", "provenance": "SELECT t1.tmid, CASE WHEN t1.won > t2.won THEN 1 ELSE 0 END AS result FROM (SELECT tmid, won FROM coaches WHERE year = 2005) t1 JOIN (SELECT tmid, won FROM coaches WHERE year = 2004) t2 ON t1.tmid = t2.tmid;", "provenance_cols": { "coaches": [ "tmid", "won" ] } }, { "desc": "The change in win rate from 1972 to 1973.", "is_derived": true, "name": "win_rate_change_from_1972_to_1973", "norm_name": "winratechangefrom1972to1973", "provenance": "SELECT (SUM(CASE WHEN year = 1973 THEN won ELSE 0 END) * 1.0 / SUM(CASE WHEN year = 1973 THEN won + lost ELSE 0 END)) - (SUM(CASE WHEN year = 1972 THEN won ELSE 0 END) * 1.0 / SUM(CASE WHEN year = 1972 THEN won + lost ELSE 0 END)) AS change_in_win_rate FROM coaches;", "provenance_cols": { "coaches": [ "won", "lost" ] } }, { "desc": "games", "is_derived": false, "name": "games", "norm_name": "games" }, { "desc": "lost", "is_derived": false, "name": "lost", "norm_name": "lost" }, { "desc": "year", "is_derived": false, "name": "year", "norm_name": "year" }, { "desc": "team id", "is_derived": false, "name": "tmid", "norm_name": "tmid" }, { "desc": "won", "is_derived": false, "name": "won", "norm_name": "won" } ] }, "dprs": [ "Collect data that will allow queries on professional basketball teams, players, and coaches, including their demographic information, performance, awards, and team statistics, allowing for examination of team and player success, conference affiliations, and game outcomes.", "Collect data that will allow queries on professional basketball teams, players, and coaches. It should include information on team performance, player demographics, player statistics, and awards, allowing for examination of relationships between variables such as wins, losses, rebounds, and player positions. It should also provide insight into team composition and success factors.", "Collect data that will allow queries on professional basketball teams, players, and coaches. It should include information on team performance, player statistics, and awards, allowing for examination of relationships between variables such as wins, losses, and player accomplishments. It should also cover player demographics and conference affiliations." ], "relevant_ques_in_bird": [ "Which team(s) has greater than 75% lost among all the games played.", "Please list down the last name of players from \"BLB\" team.", "Please list the first name of the players from the NBA league with the forward position.", "What is the percentage of offense rebounds from the total rebounds of the players in year 2000.", "How many percent of points were scored by NBA players who belonged to 'LAL' team and had performed steals movement.", "Which team had more than one player who grabbed more than 600 rebounds in 2011? Give the full name of the team.", "Which team(s) had 90% games won. List the coach ID for the team and year played.", "List the year, team and coach that with winning rate of above 75%.", "Of the players drafted in NBA between 1990 and 2000, who has the most points in all-star? List the player's first name and last name.", "In the year 1997 allstar game, which teams did the players had the most rebounds play in? List their team ids." ], "topics_from_dp_tables": [ "coaches", "professional sports", "basketball players", "nba", "sports", "teams", "basketball", "basketball awards" ], "topics_from_dpr": [ "player statistics", "conference affiliations", "team performance", "awards and accomplishments", "player demographics", "game outcomes" ] }, "public_review_platform": { "dp_tables": { "business": [ { "desc": "whether the business is still actively running until now", "is_derived": false, "name": "active", "norm_name": "active" }, { "desc": "The city where the business is located.", "is_derived": false, "name": "city", "norm_name": "city" }, { "desc": "The average review star of the business", "is_derived": true, "name": "average_review_star", "norm_name": "averagereviewstar", "provenance": "SELECT AVG(T1.stars) FROM business AS T1", "provenance_cols": { "business": [ "stars" ] } }, { "desc": "Unique identifier for the business.", "is_derived": false, "name": "business_id", "norm_name": "businessid" }, { "desc": "Set to 1 if the business has more than 10 attributes, 0 otherwise.", "is_derived": true, "name": "has_more_than_10_attributes", "norm_name": "hasmorethan10attributes", "provenance": "SELECT business_id, CASE WHEN count(attribute_id) > 10 THEN 1 ELSE 0 END AS has_more_than_10_attributes FROM business_attributes GROUP BY business_id", "provenance_cols": { "business_attributes": [ "business_id", "attribute_id" ] } }, { "desc": "The number of long reviews the business has received, replace NULL values with 0.", "is_derived": true, "name": "num_long_reviews", "norm_name": "numlongreviews", "provenance": "SELECT business_id, COUNT(CASE WHEN review_length > 1000 THEN 1 ELSE NULL END) AS number_of_long_reviews FROM reviews GROUP BY business_id;", "provenance_cols": { "reviews": [ "business_id", "review_length" ] } }, { "desc": "Set to 1 if the business has received the review of 4-star and above by 65% of users, 0 otherwise.", "is_derived": true, "name": "received_the_review_of_4_star_and_above_by_65_per_of_user", "norm_name": "receivedthereviewof4starandaboveby65perofuser", "provenance": "SELECT b.business_id, CASE WHEN SUM(CASE WHEN r.review_stars >= 4 THEN 1 ELSE 0 END) * 1.0 / COUNT(r.review_stars) >= 0.65 THEN 1 ELSE 0 END AS review_threshold FROM business b JOIN reviews r ON b.business_id = r.business_id GROUP BY b.business_id", "provenance_cols": { "business": [ "business_id" ], "reviews": [ "review_stars", "business_id" ] } }, { "desc": "ratings of the business", "is_derived": false, "name": "stars", "norm_name": "stars" }, { "desc": "The state where the business is located", "is_derived": false, "name": "state", "norm_name": "state" } ], "business_categories": [ { "desc": "id number identifying the business", "is_derived": false, "name": "business_id", "norm_name": "businessid" }, { "desc": "id number identifying the categories", "is_derived": false, "name": "category_id", "norm_name": "categoryid" } ], "categories": [ { "desc": "category_id", "is_derived": false, "name": "category_id", "norm_name": "categoryid" }, { "desc": "category_name", "is_derived": false, "name": "category_name", "norm_name": "categoryname" } ], "reviews": [ { "desc": "the number identifying the business", "is_derived": false, "name": "business_id", "norm_name": "businessid" }, { "desc": "the number identifying the user who comments on this business", "is_derived": false, "name": "user_id", "norm_name": "userid" }, { "desc": "review on this business", "is_derived": false, "name": "review_stars", "norm_name": "reviewstars" }, { "desc": "The length of the review written by the user", "is_derived": false, "name": "review_length", "norm_name": "reviewlength" } ], "tips": [ { "desc": "the number identifying the user who comments on this business", "is_derived": false, "name": "user_id", "norm_name": "userid" }, { "desc": "the number identifying the business", "is_derived": false, "name": "business_id", "norm_name": "businessid" }, { "desc": "how many likes of this tips", "is_derived": false, "name": "likes", "norm_name": "likes" } ], "users": [ { "desc": "The total number of fans / followers the user has", "is_derived": false, "name": "user_fans", "norm_name": "userfans" }, { "desc": "The time when the user join Yelp.", "is_derived": false, "name": "user_yelping_since_year", "norm_name": "useryelpingsinceyear" }, { "desc": "Set to 1 if the user has been an elite user for 5 years or more, 0 otherwise.", "is_derived": true, "name": "is_an_elite_user_for_5_years_or_more", "norm_name": "isaneliteuserfor5yearsormore", "provenance": "SELECT user_id, CASE WHEN COUNT(year_id) >= 5 THEN 1 ELSE 0 END AS is_elite_user FROM elite GROUP BY user_id", "provenance_cols": { "elite": [ "user_id", "year_id" ] } }, { "desc": "The number of 5-star reviews the user has given, replace NULL values with 0.", "is_derived": true, "name": "num_5_star_reviews", "norm_name": "num5starreviews", "provenance": "SELECT COALESCE(COUNT(*), 0) FROM reviews WHERE review_stars = 5;", "provenance_cols": { "reviews": [ "review_stars" ] } }, { "desc": "The number of businesses the user has reviewed, replace NULL values with 0.", "is_derived": true, "name": "num_business_reviewed", "norm_name": "numbusinessreviewed", "provenance": "SELECT COALESCE(COUNT(business_id), 0) FROM reviews WHERE user_id = ?;", "provenance_cols": { "reviews": [ "business_id", "user_id" ] } }, { "desc": "The number of funny type of compliments the user has received, replace NULL values with 0.", "is_derived": true, "name": "num_of_funny_type_of_compliments", "norm_name": "numoffunnytypeofcompliments", "provenance": "SELECT COALESCE(SUM(T2.number_of_compliments), 0) FROM compliments AS T1 LEFT JOIN users_compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T1.compliment_type = 'funny';", "provenance_cols": { "compliments": [ "compliment_id", "compliment_type" ], "users_compliments": [ "number_of_compliments", "compliment_id" ] } }, { "desc": "Set to 1 if the user has received less than 5 low compliments from other users, 0 otherwise.", "is_derived": true, "name": "received_less_than_5_low_compliments_from_other_users", "norm_name": "receivedlessthan5lowcomplimentsfromotherusers", "provenance": "SELECT user_id, CASE WHEN number_of_compliments < 5 THEN 1 ELSE 0 END AS low_compliments_flag FROM users_compliments WHERE compliment_id = (SELECT compliment_id FROM compliments WHERE compliment_type = 'low');", "provenance_cols": { "compliments": [ "compliment_type" ], "users_compliments": [ "user_id", "number_of_compliments", "compliment_id" ] } }, { "desc": "Unique identifier for the user.", "is_derived": false, "name": "user_id", "norm_name": "userid" } ] }, "dprs": [ "Collect data that will allow queries on user interactions and business attributes on a review platform. It should include information about user demographics, reviewer account interactions, review habits, and business characteristics, such as location and ratings. The data should be used to study user behavior, business performance, and relationships between users and businesses.", "Collect data that will allow queries on user and business interactions on a review platform. It should include information about user demographics, business attributes, and review metrics, allowing for insights into user behavior and business performance. It should cover various aspects, such as user engagement, business characteristics, and review content.", "Collect data that will allow queries on user and business interactions on a review platform, including user demographics, business attributes, and review metrics, allowing for insights into user behavior and business performance." ], "relevant_ques_in_bird": [ "Please list the businesses names whose length of user review is long with business id from 1 to 20.", "For the business with great experience existed in Sun Lakes city, provide the user ID who gave review on it and user followers.", "Identify the percent of long reviews among all 5-star reviews given to businesses by the Yelp users.", "Provide the list of user ID along with review star of which has the review length of medium with business ID of 35.", "List out 10 business ID that are being reviewed the most by users and list out what are top 3 business categories.", "How many businesses operating in the \"Accessories\" category have received a \"wonderful experience\" review from users?", "Calculate the average review star from users in businesses located in South Carolina and California state.", "List the user ID, business ID with review length of the business which received the most likes in tips." ], "topics_from_dp_tables": [ "product ratings", "review platforms", "small business", "yelp reviews", "customer reviews", "business reviews", "rating systems" ], "topics_from_dpr": [ "business attributes", "user behavior", "user demographics", "business performance", "review metrics" ] }, "retail_complains": { "dp_tables": { "callcenterlogs": [ { "desc": "server time", "is_derived": false, "name": "ser_time", "norm_name": "sertime" }, { "desc": "unique id number representing each complaint", "is_derived": false, "name": "complaint id", "norm_name": "complaintid" }, { "desc": "client id", "is_derived": false, "name": "rand client", "norm_name": "randclient" }, { "desc": "the outcome of processing of complaints", "is_derived": false, "name": "outcome", "norm_name": "outcome" }, { "desc": "complaint date", "is_derived": false, "name": "date received", "norm_name": "datereceived" }, { "desc": "server", "is_derived": false, "name": "server", "norm_name": "server" }, { "desc": "final phone number", "is_derived": false, "name": "phonefinal", "norm_name": "phonefinal" }, { "desc": "id number identifying the call", "is_derived": false, "name": "call_id", "norm_name": "callid" } ], "client": [ { "desc": "Unique identifier for the client.", "is_derived": false, "name": "client_id", "norm_name": "clientid" }, { "desc": "The number of days of the longest delay in the client's complaint.", "is_derived": true, "name": "days_of_longest_delay_of_complaint", "norm_name": "daysoflongestdelayofcomplaint", "provenance": "SELECT MAX(DATEDIFF(COALESCE(`date sent to company`, '9999-12-31'), `date received`)) AS longest_delay_days FROM events;", "provenance_cols": { "events": [ "date sent to company", "date received" ] } }, { "desc": "Full name of the client. Concatenates the first name, middle name, and last name, separated by a space.", "is_derived": true, "name": "full_name", "norm_name": "fullname", "provenance": "SELECT CONCAT(first, ' ', middle, ' ', last) AS Full_name FROM client", "provenance_cols": { "client": [ "middle" ] } }, { "desc": "Set to 1 if the client has in progress complaints, 0 otherwise.", "is_derived": true, "name": "has_in_progress_complaints", "norm_name": "hasinprogresscomplaints", "provenance": "SELECT c.client_id, CASE WHEN e.complaint_id IS NOT NULL THEN 1 ELSE 0 END AS has_in_progress_complaints FROM client c LEFT JOIN events e ON c.client_id = e.client_id AND e.`company response to consumer` IS NULL;", "provenance_cols": { "client": [ "client_id" ], "events": [ "complaint id", "client_id", "company response to consumer" ] } }, { "desc": "The issue that the client with the longest server time faced,with ties broken by the ascending order of the issue", "is_derived": true, "name": "issue_with_the_longest_server_time", "norm_name": "issuewiththelongestservertime", "provenance": "SELECT T1.issue FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`complaint id` = T2.`complaint id` ORDER BY T2.ser_time DESC, T1.issue ASC LIMIT 1;", "provenance_cols": { "callcenterlogs": [ "complaint id", "ser_time" ], "events": [ "issue", "complaint id" ] } }, { "desc": "The number of complaints submitted via fax, replace NULL values with 0.", "is_derived": true, "name": "number_of_complaint_submitted_via_fax", "norm_name": "numberofcomplaintsubmittedviafax", "provenance": "SELECT COALESCE(COUNT(`complaint id`), 0) FROM events WHERE `submitted via` = 'Fax';", "provenance_cols": { "events": [ "complaint id", "submitted via" ] } }, { "desc": "The percentage of complaint calls that got consent.", "is_derived": true, "name": "percentage_of_complaint_calls_got_consent", "norm_name": "percentageofcomplaintcallsgotconsent", "provenance": "SELECT CAST(SUM(CASE WHEN e.`consumer consent provided?` = 'Yes' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(e.`complaint id`) AS percentage_of_complaints_with_consent FROM events e", "provenance_cols": { "events": [ "consumer consent provided?", "complaint id" ] } }, { "desc": "Sex of the client.", "is_derived": false, "name": "sex", "norm_name": "sex" }, { "desc": "city", "is_derived": false, "name": "city", "norm_name": "city" }, { "desc": "phone number", "is_derived": false, "name": "phone", "norm_name": "phone" }, { "desc": "first name", "is_derived": false, "name": "first", "norm_name": "first" }, { "desc": "middle name", "is_derived": false, "name": "middle", "norm_name": "middle" }, { "desc": "last name", "is_derived": false, "name": "last", "norm_name": "last" }, { "desc": "state code", "is_derived": false, "name": "state", "norm_name": "state" }, { "desc": "age", "is_derived": false, "name": "age", "norm_name": "age" } ], "events": [ { "desc": "id number indicating which client", "is_derived": false, "name": "client_id", "norm_name": "clientid" }, { "desc": "whether the response of the company is timely", "is_derived": false, "name": "timely response?", "norm_name": "timelyresponse?" }, { "desc": "Date received", "is_derived": false, "name": "date received", "norm_name": "datereceived" }, { "desc": "id number indicating which complaint", "is_derived": false, "name": "complaint id", "norm_name": "complaintid" }, { "desc": "problems leading to this complaints", "is_derived": false, "name": "issue", "norm_name": "issue" }, { "desc": "Submitted via", "is_derived": false, "name": "submitted via", "norm_name": "submittedvia" }, { "desc": "complaining about which product ", "is_derived": false, "name": "product", "norm_name": "product" }, { "desc": "Company response to consumer", "is_derived": false, "name": "company response to consumer", "norm_name": "companyresponsetoconsumer" } ] }, "dprs": [ "Collect data that will allow queries on customer complaints, including client information, complaint details, and processing outcomes. It should provide insights into complaint types, resolution priorities, and client demographics, allowing for examination of complaint patterns and trends. It should also support investigation of issues and client experiences.", "Collect data that will allow queries on customer complaints, including client information, complaint details, and processing outcomes. It should provide insights into issues, priorities, and resolutions, as well as client demographics and contact methods. It should also support examination of complaint patterns, client experiences, and service effectiveness.", "Collect data that will allow queries on client complaints, including personal information, complaint details, and processing outcomes. It should provide insights into client demographics, complaint types, and issue resolution, as well as metrics on complaint handling efficiency and effectiveness. It should also support examination of client experiences and complaint trends." ], "relevant_ques_in_bird": [ "List by their ID number the 3 longest complaints.", "Among the clients who did receive a timely response for their complaint, how many of them are from New York?", "What is the percentage of the increase of complaints filed by the clients from New York from the year 2016 to the year 2017?", "For all the complaint callers on 2017/3/27, what percentage of the clients are females?", "How many clients who live in New York City have the complaint outcome as \"AGENT\"?", "List down the issues for complaint with server time of below 10 minutes.", "In complaints received in 2014, how many of them were submitted via call?", "How many complaints on credit cards in the year 2016 were filed by male clients?", "List all the server of the phone complaints with a late response from the company.", "Write the complaint ID, call ID, and final phone number of complaints through AVIDAN server from 1/1/2014 to 12/30/2014.", "From 2012 to 2015, how many complaints were submitted via email from female clients?", "Please list all clients' phone numbers and complaint IDs which are still in progress.", "Give the client ID of the complaint received on April 16, 2014 and submitted through fax.", "Among the complaints received in year 2015, what is total number of complaints timely response and closed with an explanation?", "Please list the full names of all the clients whose complaints are still in progress.", "What is the average number of complaints on credit cards filed by clients from New York in the 3 consecutive years starting from 2015?", "What is the medium through which most complaints are registered in Florida?", "List the full name and phone number of clients who submitted the complaint via fax.", "Among the female clients that age between 20 to 40, list the date when their complaints were received." ], "topics_from_dp_tables": [ "complaint resolution", "customer service", "customer issues", "consumer complaints", "retail customer feedback" ], "topics_from_dpr": [ "client demographics", "complaint patterns and trends", "complaint handling", "customer complaints", "service effectiveness" ] }, "retails": { "dp_tables": { "customer": [ { "desc": "The average total price per order the customer has made.", "is_derived": true, "name": "average_total_price_per_order", "norm_name": "averagetotalpriceperorder", "provenance": "SELECT AVG(o_totalprice) FROM orders;", "provenance_cols": { "orders": [ "o_totalprice" ] } }, { "desc": "Set to 1 if the account balance of the customer is lower than 4000 and the customer is from the US, otherwise, set to 0", "is_derived": true, "name": "balance_lower_than_4000_and_in_US", "norm_name": "balancelowerthan4000andinus", "provenance": "SELECT CASE WHEN c.c_acctbal < 4000 AND n.n_name = 'UNITED STATES' THEN 1 ELSE 0 END FROM customer c JOIN nation n ON c.c_nationkey = n.n_nationkey;", "provenance_cols": { "customer": [ "c_acctbal", "c_nationkey" ], "nation": [ "n_name", "n_nationkey" ] } }, { "desc": "Unique identifier for the customer.", "is_derived": false, "name": "c_custkey", "norm_name": "ccustkey" }, { "desc": "The name of the customer.", "is_derived": false, "name": "c_name", "norm_name": "cname" }, { "desc": "The nation key of the customer.", "is_derived": false, "name": "c_nationkey", "norm_name": "cnationkey" }, { "desc": "Set to 1 if the account balance of the customer is above the average account balance of all customers, otherwise, set to 0", "is_derived": true, "name": "has_above_average_account_balance", "norm_name": "hasaboveaverageaccountbalance", "provenance": "SELECT c_custkey, c_acctbal, CASE WHEN c_acctbal > (SELECT AVG(c_acctbal) FROM customer) THEN 1 ELSE 0 END AS above_average FROM customer;", "provenance_cols": { "customer": [ "c_custkey", "c_acctbal" ] } }, { "desc": "The number of orders the customer has made, replace NULL values with 0.", "is_derived": true, "name": "num_orders", "norm_name": "numorders", "provenance": "SELECT c.c_custkey, c.c_name, COALESCE(o_ordercount, 0) AS order_count FROM customer c LEFT JOIN (SELECT o_custkey, COUNT(o_orderkey) AS o_ordercount FROM orders GROUP BY o_custkey) o ON c.c_custkey = o.o_custkey", "provenance_cols": { "customer": [ "c_custkey", "c_name" ], "orders": [ "o_custkey", "o_orderkey" ] } }, { "desc": "The order date with the highest total price the customer has made, with ties broken by the ascending order of the order date.", "is_derived": true, "name": "order_date_highest_total_price", "norm_name": "orderdatehighesttotalprice", "provenance": "SELECT o_orderdate FROM orders ORDER BY o_totalprice DESC, o_orderdate ASC LIMIT 1;", "provenance_cols": { "orders": [ "o_orderdate", "o_totalprice" ] } }, { "desc": "the segment of the customer", "is_derived": false, "name": "c_mktsegment", "norm_name": "cmktsegment" } ], "lineitem": [ { "desc": "order key number of line item ", "is_derived": false, "name": "l_orderkey", "norm_name": "lorderkey" }, { "desc": "suppkey of line item ", "is_derived": false, "name": "l_suppkey", "norm_name": "lsuppkey" }, { "desc": "quantity of line item ", "is_derived": false, "name": "l_quantity", "norm_name": "lquantity" } ], "nation": [ { "desc": "Set to 1 if the average account balance of the customers in the nation is larger than the average account balance across all customers, otherwise, set to 0", "is_derived": true, "name": "balance_larger_thant_avg_balance", "norm_name": "balancelargerthantavgbalance", "provenance": "SELECT CASE WHEN AVG(c.c_acctbal) > (SELECT AVG(c_acctbal) FROM customer) THEN 1 ELSE 0 END FROM customer c JOIN nation n ON c.c_nationkey = n.n_nationkey;", "provenance_cols": { "customer": [ "c_acctbal", "c_acctbal", "c_nationkey" ], "nation": [ "n_nationkey" ] } }, { "desc": "The name of the nation.", "is_derived": false, "name": "n_name", "norm_name": "nname" }, { "desc": "Unique identifier for the nation.", "is_derived": false, "name": "n_nationkey", "norm_name": "nnationkey" }, { "desc": "The region key of the nation.", "is_derived": false, "name": "n_regionkey", "norm_name": "nregionkey" }, { "desc": "The number of suppliers whose accounts are in debt in the nation, replace NULL values with 0.", "is_derived": true, "name": "num_suppliers_in_debt", "norm_name": "numsuppliersindebt", "provenance": "SELECT COUNT(s.s_suppkey) FROM supplier s WHERE COALESCE(s.s_acctbal, 0) < 0;", "provenance_cols": { "supplier": [ "s_suppkey", "s_acctbal" ] } }, { "desc": "The percentage of suppliers whose accounts are in debt in the nation", "is_derived": true, "name": "per_indebted_suppliers", "norm_name": "perindebtedsuppliers", "provenance": "SELECT SUM(CASE WHEN s_acctbal < 0 THEN 1 ELSE 0 END) * 100.0 / COUNT(s_suppkey) FROM supplier;", "provenance_cols": { "supplier": [ "s_acctbal", "s_suppkey" ] } }, { "desc": "The total price of all orders from the nation, replace NULL values with 0.", "is_derived": true, "name": "total_price_of_all_orders", "norm_name": "totalpriceofallorders", "provenance": "SELECT COALESCE(SUM(o_totalprice), 0) FROM orders WHERE o_custkey IN ( SELECT c_custkey FROM customer WHERE c_nationkey IN ( SELECT n_nationkey FROM nation ) );", "provenance_cols": { "customer": [ "c_custkey", "c_nationkey" ], "nation": [ "n_nationkey" ], "orders": [ "o_totalprice", "o_custkey" ] } } ], "orders": [ { "desc": "comment description of order", "is_derived": false, "name": "o_comment", "norm_name": "ocomment" }, { "desc": "customer key of order", "is_derived": false, "name": "o_custkey", "norm_name": "ocustkey" }, { "desc": "unique id number identifying the order", "is_derived": false, "name": "o_orderkey", "norm_name": "oorderkey" }, { "desc": "date of the order", "is_derived": false, "name": "o_orderdate", "norm_name": "oorderdate" } ], "part": [ { "desc": "name of part", "is_derived": false, "name": "p_name", "norm_name": "pname" }, { "desc": "unique id number identifying the part", "is_derived": false, "name": "p_partkey", "norm_name": "ppartkey" }, { "desc": "size number of part", "is_derived": false, "name": "p_size", "norm_name": "psize" } ], "partsupp": [ { "desc": "unique id number identifying the supply key", "is_derived": false, "name": "ps_suppkey", "norm_name": "pssuppkey" }, { "desc": "unique id number identifying the part key", "is_derived": false, "name": "ps_partkey", "norm_name": "pspartkey" } ], "region": [ { "desc": "name of the region", "is_derived": false, "name": "r_name", "norm_name": "rname" }, { "desc": "unique id number identifying the region", "is_derived": false, "name": "r_regionkey", "norm_name": "rregionkey" } ], "supplier": [ { "desc": "account balance of the supplier", "is_derived": false, "name": "s_acctbal", "norm_name": "sacctbal" }, { "desc": "unique id number identifying the supply", "is_derived": false, "name": "s_suppkey", "norm_name": "ssuppkey" }, { "desc": "name of the supplier", "is_derived": false, "name": "s_name", "norm_name": "sname" }, { "desc": "phone number of the supplier", "is_derived": false, "name": "s_phone", "norm_name": "sphone" }, { "desc": "address of the supplier", "is_derived": false, "name": "s_address", "norm_name": "saddress" } ] }, "dprs": [ "Collect data that will allow queries on supplier and customer interactions, including order details, shipping information, and account balances. It should provide insights into regional sales, customer segments, and supplier performance, allowing for evaluation of business relationships and market trends. It should also support examination of national and regional economic health.", "Collect data that will allow queries on customer and supplier information, including orders, shipments, and account balances. It should provide insights into customer behavior, supplier performance, and regional trends. The data should be used to evaluate business relationships, identify areas of improvement, and inform strategic decisions.", "Collect data that will allow queries on supplier and customer interactions, including order details, shipping information, and account balances. It should provide insights into regional sales, customer segments, and supplier performance, allowing for evaluations of business relationships and market trends. It should also support assessments of national and regional economic health." ], "relevant_ques_in_bird": [ "Find the supply key of the top ten suppliers with the most account balance, and list the supply key along with the account balance in descending order of account balance.", "Please list the names of the top 3 suppliers with the most amount of money in their accounts.", "What is the account balance of the supplier with the most parts?", "Please list the order comments of all the orders made by customers in the household segment.", "Please list the phone numbers of all the suppliers for the parts ordered in order no.1.", "What are the total quantities of the items ordered by customer 101660 on 10/5/1995?", "Lists all parts supplied by Supplier#000000034.", "What is the region with the most customers?", "List all the addresses for the suppliers of the biggest parts.", "Please list the names of all the suppliers for the part with the highest retail price." ], "topics_from_dp_tables": [ "marketing research", "retail industry", "market analysis", "supply chain management", "customer relationship management", "sales data" ], "topics_from_dpr": [ "business relationships", "economic health", "supplier performance", "market trends", "regional sales", "customer behavior" ] }, "soccer_2016": { "dp_tables": { "batsman_scored": [ { "desc": "Unique Number which Identifies an over in an Innings", "is_derived": false, "name": "over_id", "norm_name": "overid" }, { "desc": "Unique Number which Identifies a ball in an over", "is_derived": false, "name": "ball_id", "norm_name": "ballid" }, { "desc": "Unique Number Which Identifies a match", "is_derived": false, "name": "match_id", "norm_name": "matchid" }, { "desc": "Unique Number which Identifies an innings in a match", "is_derived": false, "name": "innings_no", "norm_name": "inningsno" }, { "desc": "Number of Runs scored by the batsman", "is_derived": false, "name": "runs_scored", "norm_name": "runsscored" } ], "city": [ { "desc": "city name", "is_derived": false, "name": "city_name", "norm_name": "cityname" }, { "desc": "unique id for city", "is_derived": false, "name": "city_id", "norm_name": "cityid" }, { "desc": "id of country", "is_derived": false, "name": "country_id", "norm_name": "countryid" } ], "country": [ { "desc": "country name", "is_derived": false, "name": "country_name", "norm_name": "countryname" }, { "desc": "unique id for country", "is_derived": false, "name": "country_id", "norm_name": "countryid" } ], "match": [ { "desc": "the date of the match", "is_derived": false, "name": "match_date", "norm_name": "matchdate" }, { "desc": "unique id for match", "is_derived": false, "name": "match_id", "norm_name": "matchid" }, { "desc": "the team id of the match winner", "is_derived": false, "name": "match_winner", "norm_name": "matchwinner" }, { "desc": "the team id of the first team", "is_derived": false, "name": "team_1", "norm_name": "team1" }, { "desc": "the points of the winning margin", "is_derived": false, "name": "win_margin", "norm_name": "winmargin" }, { "desc": "the id of the venue where the match held", "is_derived": false, "name": "venue_id", "norm_name": "venueid" } ], "team": [ { "desc": "The time of the first match played by the team.", "is_derived": true, "name": "first_match_time", "norm_name": "firstmatchtime", "provenance": "SELECT MIN(match_date) FROM match WHERE team_1 = (SELECT team_id FROM team WHERE team_name = 'team_name') OR team_2 = (SELECT team_id FROM team WHERE team_name = 'team_name');", "provenance_cols": { "match": [ "match_date", "team_1", "team_2" ], "team": [ "team_id", "team_name" ] } }, { "desc": "The number of matches the team has won in season 1, replace NULL values with 0.", "is_derived": true, "name": "number_of_season_1_match_won", "norm_name": "numberofseason1matchwon", "provenance": "SELECT COUNT(*) FROM match WHERE season_id = 1 AND match_winner IS NOT NULL;", "provenance_cols": { "match": [ "season_id", "match_winner" ] } }, { "desc": "The number of times the team has won the toss, replace NULL values with 0.", "is_derived": true, "name": "number_of_times_toss_winner", "norm_name": "numberoftimestosswinner", "provenance": "SELECT COALESCE(COUNT(toss_winner), 0) FROM match;", "provenance_cols": { "match": [ "toss_winner" ] } }, { "desc": "Unique identifier for the team.", "is_derived": false, "name": "team_id", "norm_name": "teamid" }, { "desc": "The name of the team.", "is_derived": false, "name": "team_name", "norm_name": "teamname" }, { "desc": "The win rate of the team.", "is_derived": true, "name": "win_rate", "norm_name": "winrate", "provenance": "SELECT T1.team_name, CAST(SUM(CASE WHEN T2.match_winner = T1.team_id THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.match_winner = T1.team_id OR T2.match_winner = T3.team_id THEN 1 ELSE 0 END) AS win_rate FROM team T1 JOIN match T2 ON T1.team_id = T2.team_1 JOIN team T3 ON T3.team_id = T2.team_2 GROUP BY T1.team_name", "provenance_cols": { "match": [ "match_winner", "team_1", "team_2" ], "team": [ "team_name", "team_id" ] } } ], "umpire": [ { "desc": "the unique id of the umpire", "is_derived": false, "name": "umpire_id", "norm_name": "umpireid" }, { "desc": "umpire's name", "is_derived": false, "name": "umpire_name", "norm_name": "umpirename" }, { "desc": "the id of the country where the umpire are from", "is_derived": false, "name": "umpire_country", "norm_name": "umpirecountry" } ], "venue": [ { "desc": "the name of the venue", "is_derived": false, "name": "venue_name", "norm_name": "venuename" }, { "desc": "the unique id of the venue", "is_derived": false, "name": "venue_id", "norm_name": "venueid" }, { "desc": "the city id where the venue is located in ", "is_derived": false, "name": "city_id", "norm_name": "cityid" } ] }, "dprs": [ "Collect data that will allow queries on sports matches, including team and player information, match outcomes, and venue details. It should provide insights into team performance, winning margins, and win rates, as well as player and venue data. It should also support examination of match results, team strengths, and player backgrounds.", "Collect data that will allow queries on sports matches, including team and player information, match outcomes, and venue details. It should provide insights into team performance, winning margins, and win rates, allowing for evaluation of team strengths and weaknesses. It should also include information on match timing and toss winners, facilitating a comprehensive understanding of soccer matches.", "Collect data that will allow queries on sports matches, including team and player information, match outcomes, and venue details. It should provide insights into team performance, winning margins, and win rates, allowing for comparisons and evaluations of teams and players. It should also support examination of match results, team statistics, and player backgrounds." ], "relevant_ques_in_bird": [ "Provide the match IDs which were held on 18th April 2015.", "How many matches are there in April, 2008?", "How many victory matches were there in 2008?", "List the first team's name in the match with the highest winning margin.", "Among the matches held in 2015, who is the winning team in the match ID 829768?", "Write down the player names and IDs of the English umpires.", "List the ball IDs, scores, and innings numbers in the over ID 20 of match ID \"335988\".", "Among the matches held in St. George's Park, give the match ID of the match with the highest winning margin points.", "Give the match's venue and winning team for the match ID 392194.", "Provide the complete name of the venue, city and country where the last match was held." ], "topics_from_dp_tables": [ "stadium", "league", "championship", "football", "sports", "cricket", "tournament", "soccer" ], "topics_from_dpr": [ "player backgrounds", "player information", "venue details", "team performance", "soccer matches", "match outcomes", "team statistics" ] }, "superstore": { "dp_tables": { "central_superstore": [ { "desc": "Unique identifier for the customer.", "is_derived": false, "name": "customer id", "norm_name": "customerid" }, { "desc": "The item ordered with the highest quantity in the East region by the customer, with ties broken by the descending order of the product name.", "is_derived": true, "name": "item_ordered_with_the_highest_quantity_in_the_East_region", "norm_name": "itemorderedwiththehighestquantityintheeastregion", "provenance": "SELECT T2.`product name` FROM east_superstore AS T1 JOIN product AS T2 ON T1.`product id` = T2.`product id` WHERE T1.region = 'East' ORDER BY T1.quantity DESC, T2.`product name` DESC LIMIT 1;", "provenance_cols": { "east_superstore": [ "product id", "region", "quantity" ], "product": [ "product name", "product id" ] } }, { "desc": "The name of the product that was ordered most recently by the customer, with ties broken by the ascending order of the product name.", "is_derived": true, "name": "name_of_the_product_that_was_ordered_recently", "norm_name": "nameoftheproductthatwasorderedrecently", "provenance": "SELECT p.`product name` FROM central_superstore c JOIN product p ON c.`product id` = p.`product id` ORDER BY c.`order date` DESC, p.`product name` ASC LIMIT 1;", "provenance_cols": { "central_superstore": [ "product id", "order date" ], "product": [ "product name", "product id" ] } }, { "desc": "The number of orders in 2016 from the East region superstore by the customer, replace NULL values with 0.", "is_derived": true, "name": "number_of_orders_in_2016_from_the_east_superstore", "norm_name": "numberofordersin2016fromtheeastsuperstore", "provenance": "SELECT p.`customer id`, COUNT(e.`order id`) AS number_of_orders FROM people p JOIN east_superstore e ON p.`customer id` = e.`customer id` WHERE e.`region` = 'East' AND STRFTIME('%Y', e.`order date`) = '2016' GROUP BY p.`customer id`", "provenance_cols": { "east_superstore": [ "order id", "customer id", "region", "order date" ], "people": [ "customer id" ] } }, { "desc": "The largest total cost of products in a single order the customer has made.", "is_derived": true, "name": "the_largest_total_cost_of_products_in_a_single_order", "norm_name": "thelargesttotalcostofproductsinasingleorder", "provenance": "SELECT MAX(total_cost) FROM ( SELECT \"order id\", SUM(sales) AS total_cost FROM central_superstore GROUP BY \"order id\" UNION ALL SELECT \"order id\", SUM(sales) AS total_cost FROM east_superstore GROUP BY \"order id\" UNION ALL SELECT \"order id\", SUM(sales) AS total_cost FROM south_superstore GROUP BY \"order id\" UNION ALL SELECT \"order id\", SUM(sales) AS total_cost FROM west_superstore GROUP BY \"order id\" );", "provenance_cols": { "central_superstore": [ "order id", "sales" ] } }, { "desc": "the id of the product", "is_derived": false, "name": "product id", "norm_name": "productid" }, { "desc": "the unique id for rows", "is_derived": false, "name": "row id", "norm_name": "rowid" } ], "east_superstore": [ { "desc": "the id of the product", "is_derived": false, "name": "product id", "norm_name": "productid" }, { "desc": "the id of the customer", "is_derived": false, "name": "customer id", "norm_name": "customerid" }, { "desc": "the profit that the company got by selling the product", "is_derived": false, "name": "profit", "norm_name": "profit" }, { "desc": "region of the customer's address", "is_derived": false, "name": "region", "norm_name": "region" }, { "desc": "the quantity of the product", "is_derived": false, "name": "quantity", "norm_name": "quantity" }, { "desc": "the discount of the product", "is_derived": false, "name": "discount", "norm_name": "discount" }, { "desc": "the sales of the product", "is_derived": false, "name": "sales", "norm_name": "sales" }, { "desc": "the unique identifier for the order", "is_derived": false, "name": "order id", "norm_name": "orderid" }, { "desc": "the unique id for rows", "is_derived": false, "name": "row id", "norm_name": "rowid" } ], "people": [ { "desc": "The name of the customer.", "is_derived": false, "name": "customer name", "norm_name": "customername" }, { "desc": "The segment the customer belongs to.", "is_derived": false, "name": "segment", "norm_name": "segment" }, { "desc": "the id of the customers", "is_derived": false, "name": "customer id", "norm_name": "customerid" }, { "desc": "the city of people", "is_derived": false, "name": "city", "norm_name": "city" }, { "desc": "the state of people", "is_derived": false, "name": "state", "norm_name": "state" } ], "product": [ { "desc": "Set to 1 if the profit of the product is greater than 98% of the average profit of all products in the East region, 0 otherwise.", "is_derived": true, "name": "has_a_profit_greater_than_98_per_of_the_average_profit_of_all_products_in_the_East_region", "norm_name": "hasaprofitgreaterthan98peroftheaverageprofitofallproductsintheeastregion", "provenance": "SELECT `product id`, profit, CASE WHEN profit > (SELECT AVG(profit) * 0.98 FROM east_superstore) THEN 1 ELSE 0 END AS result FROM east_superstore;", "provenance_cols": { "east_superstore": [ "product id", "profit" ] } }, { "desc": "Set to 1 if the product is ordered by Becky Martin around the Central region, 0 otherwise.", "is_derived": true, "name": "is_ordered_by_Becky_Martin_around_the_Central_region", "norm_name": "isorderedbybeckymartinaroundthecentralregion", "provenance": "SELECT CASE WHEN p.`customer name` = 'Becky Martin' AND c.region = 'Central' THEN 1 ELSE 0 END AS result FROM central_superstore c JOIN people p ON c.`customer id` = p.`customer id`", "provenance_cols": { "central_superstore": [ "region", "customer id" ], "people": [ "customer name", "customer id" ] } }, { "desc": "The percentage of consumers among the customers who have ordered the product.", "is_derived": true, "name": "percetange_of_consumers_among_the_customers", "norm_name": "percetangeofconsumersamongthecustomers", "provenance": "SELECT CAST(COUNT(DISTINCT CASE WHEN T1.segment = 'Consumer' THEN T1.`customer id` END) AS REAL) * 100 / COUNT(DISTINCT T1.`customer id`) FROM people T1 JOIN central_superstore T2 ON T1.`customer id` = T2.`customer id`", "provenance_cols": { "central_superstore": [ "customer id" ], "people": [ "segment", "customer id" ] } }, { "desc": "Unique identifier for the product.", "is_derived": false, "name": "product id", "norm_name": "productid" }, { "desc": "The name of the product.", "is_derived": false, "name": "product name", "norm_name": "productname" }, { "desc": "The total profits of the product, replace NULL values with 0.", "is_derived": true, "name": "total_profits", "norm_name": "totalprofits", "provenance": "SELECT COALESCE(SUM(profit), 0) AS total_profit FROM ( SELECT profit FROM central_superstore UNION ALL SELECT profit FROM east_superstore UNION ALL SELECT profit FROM south_superstore UNION ALL SELECT profit FROM west_superstore ) AS subquery;", "provenance_cols": { "central_superstore": [ "profit" ] } }, { "desc": "The total quantity sold of the product, replace NULL values with 0.", "is_derived": true, "name": "total_quantity_sold", "norm_name": "totalquantitysold", "provenance": "SELECT COALESCE(SUM(quantity), 0) AS total_quantity_sold FROM central_superstore UNION ALL SELECT COALESCE(SUM(quantity), 0) FROM east_superstore UNION ALL SELECT COALESCE(SUM(quantity), 0) FROM south_superstore UNION ALL SELECT COALESCE(SUM(quantity), 0) FROM west_superstore;", "provenance_cols": { "central_superstore": [ "quantity" ] } }, { "desc": "the region of products", "is_derived": false, "name": "region", "norm_name": "region" } ], "south_superstore": [ { "desc": "the id of the customer", "is_derived": false, "name": "customer id", "norm_name": "customerid" }, { "desc": "the id of the product", "is_derived": false, "name": "product id", "norm_name": "productid" }, { "desc": "the unique id for rows", "is_derived": false, "name": "row id", "norm_name": "rowid" } ], "west_superstore": [ { "desc": "the id of the customer", "is_derived": false, "name": "customer id", "norm_name": "customerid" }, { "desc": "the id of the product", "is_derived": false, "name": "product id", "norm_name": "productid" }, { "desc": "the unique identifier for the order", "is_derived": false, "name": "order id", "norm_name": "orderid" }, { "desc": "region of the customer's address", "is_derived": false, "name": "region", "norm_name": "region" }, { "desc": "the quantity of the product", "is_derived": false, "name": "quantity", "norm_name": "quantity" }, { "desc": "the unique id for rows", "is_derived": false, "name": "row id", "norm_name": "rowid" } ] }, "dprs": [ "Collect data that will allow queries on customer purchasing behavior, including product preferences and order history. It should provide insights into customer segments, ordering habits, and product popularity. The data should be used to understand customer trends and patterns, helping to inform business decisions.", "Collect data that will allow queries on customer purchasing behavior, including product preferences and order history. It should provide insights into customer segments, product popularity, and ordering patterns. The data should be used to understand customer needs and preferences, allowing for informed business decisions.", "Collect data that will allow queries on customer purchasing behavior, including product preferences, order history, and spending habits. It should provide insights into customer segments, product popularity, and order patterns, allowing for a deeper understanding of customer needs and trends. It should also support evaluation of customer loyalty, purchase frequency, and product affinity." ], "relevant_ques_in_bird": [ "Give the customer segment from the West region that orders the order ID CA-2011-108189.", "Who is the customer from the East region that purchased the order with the highest profit?", "Please give the name of customers from the West region that bought exactly 8 items in their purchase.", "What is the product's name in the highest quantity in a single purchase?", "List the products ordered by customers in Coachella.", "Who is the customer who purchased the largest total cost of products in a single order?", "From which city and state does the customer that bought the product with the highest sales?", "Among the customers from Chicago, Illinois, what is the highest quantity of products bought in a single order?", "Name the customers from the Eastern region whose orders cost above 80000." ], "topics_from_dp_tables": [ "superstore operations", "marketing and sales", "e-commerce", "customer service", "retail trade", "product sales", "sales data", "business and commerce", "regional sales" ], "topics_from_dpr": [ "customer segments", "order history", "product preferences", "customer purchasing behavior", "customer loyalty", "product popularity", "customer trends" ] }, "synthea": { "dp_tables": { "careplans": [ { "desc": "the patient id", "is_derived": false, "name": "patient", "norm_name": "patient" }, { "desc": "the description of the care plan", "is_derived": false, "name": "description", "norm_name": "description" }, { "desc": "the medical encounter id", "is_derived": false, "name": "encounter", "norm_name": "encounter" }, { "desc": "the start date of the care plan", "is_derived": false, "name": "start", "norm_name": "start" }, { "desc": "the code of the care plan", "is_derived": false, "name": "code", "norm_name": "code" }, { "desc": "the unique id of the care plan", "is_derived": false, "name": "id", "norm_name": "id" } ], "claims": [ { "desc": "the patient id", "is_derived": false, "name": "patient", "norm_name": "patient" }, { "desc": "the start date of the billable", "is_derived": false, "name": "billableperiod", "norm_name": "billableperiod" }, { "desc": "the unique id of the claim", "is_derived": false, "name": "id", "norm_name": "id" } ], "encounters": [ { "desc": "the patient id", "is_derived": false, "name": "patient", "norm_name": "patient" }, { "desc": "the description of the care plan", "is_derived": false, "name": "description", "norm_name": "description" }, { "desc": "the unique id of the encounter", "is_derived": false, "name": "id", "norm_name": "id" } ], "medications": [ { "desc": "the patient id", "is_derived": false, "name": "patient", "norm_name": "patient" }, { "desc": "the description of the medication", "is_derived": false, "name": "description", "norm_name": "description" } ], "patients": [ { "desc": "The birth date of the patient", "is_derived": false, "name": "birthdate", "norm_name": "birthdate" }, { "desc": "the unique id for the patient", "is_derived": false, "name": "patient", "norm_name": "patient" }, { "desc": "Set to 1 if the patient has received the IPV and is English, 0 otherwise.", "is_derived": true, "name": "has_received_the_IPV_and_is_english", "norm_name": "hasreceivedtheipvandisenglish", "provenance": "SELECT CASE WHEN i.description = 'IPV' AND p.ethnicity = 'english' THEN 1 ELSE 0 END AS result FROM patients p LEFT JOIN immunizations i ON p.patient = i.patient;", "provenance_cols": { "immunizations": [ "description", "patient" ], "patients": [ "ethnicity", "patient" ] } }, { "desc": "The highest systolic blood pressure observed for the patient.", "is_derived": true, "name": "highest_Systolic_Blood_Pressure_observed", "norm_name": "highestsystolicbloodpressureobserved", "provenance": "SELECT MAX(T1.value) FROM observations AS T1 INNER JOIN patients AS T2 ON T1.patient = T2.patient WHERE T1.description = 'Systolic Blood Pressure';", "provenance_cols": { "observations": [ "value", "patient", "description" ], "patients": [ "patient" ] } }, { "desc": "The name of the patient, formed by concatenating the first name and last name with a space in between.", "is_derived": true, "name": "name", "norm_name": "name", "provenance": "SELECT first || ' ' || last FROM patients;", "provenance_cols": {} }, { "desc": "The number of immunizations the patient has received, replace NULL values with 0.", "is_derived": true, "name": "number_of_immunizations", "norm_name": "numberofimmunizations", "provenance": "SELECT patient, COUNT(description) AS num_immunizations FROM immunizations GROUP BY patient;", "provenance_cols": { "immunizations": [ "patient", "description" ] } }, { "desc": "The number of encounters the patient has with medical professionals between 2010 and 2017, replace NULL values with 0.", "is_derived": true, "name": "num_encounters_between_2010_and_2017", "norm_name": "numencountersbetween2010and2017", "provenance": "SELECT COUNT(id) FROM encounters WHERE date BETWEEN '2010-01-01' AND '2017-12-31' OR (date IS NULL AND ('2010-01-01' IS NULL OR '2017-12-31' IS NULL));", "provenance_cols": { "encounters": [ "id" ] } }, { "desc": "The time when the patient received her/his most recent influenza seasonal vaccine", "is_derived": true, "name": "time_recieve_most_recent_vaccine", "norm_name": "timerecievemostrecentvaccine", "provenance": "SELECT patient, MAX(date) AS recent_vaccine_date FROM immunizations WHERE description LIKE '%influenza seasonal vaccine%' GROUP BY patient;", "provenance_cols": { "immunizations": [ "patient", "description" ] } }, { "desc": "the specific address", "is_derived": false, "name": "address", "norm_name": "address" }, { "desc": "the birth place", "is_derived": false, "name": "birthplace", "norm_name": "birthplace" }, { "desc": "the ethnicity of the patient", "is_derived": false, "name": "ethnicity", "norm_name": "ethnicity" }, { "desc": "the death date of the patient", "is_derived": false, "name": "deathdate", "norm_name": "deathdate" }, { "desc": "the gender of the patient", "is_derived": false, "name": "gender", "norm_name": "gender" }, { "desc": "the first name", "is_derived": false, "name": "first", "norm_name": "first" }, { "desc": "the last name", "is_derived": false, "name": "last", "norm_name": "last" } ], "procedures": [ { "desc": "the patient id", "is_derived": false, "name": "patient", "norm_name": "patient" }, { "desc": "the description of the procedure", "is_derived": false, "name": "description", "norm_name": "description" } ] }, "dprs": [ "Collect data that will allow queries on patient information, including demographic details, medical history, and care plans. It should provide insights into patient characteristics, such as birthplace, race, and ethnicity, as well as medical data like immunizations, blood pressure, and encounters with healthcare professionals. It should support a comprehensive understanding of patient profiles and healthcare experiences.", "Collect data that will allow queries on patient care plans and medical history. It should include details such as patient demographics, care plan descriptions, and medical observations, allowing for a comprehensive understanding of patient health and treatment. It should also support examination of patient interactions with medical professionals and tracking of vaccinations and health metrics.", "Collect data that will allow queries on patient care plans and demographics. It should include information about patient identities, medical histories, and care plan details, allowing for examination of patient characteristics and medical outcomes. It should support studies of patient health and healthcare services." ], "relevant_ques_in_bird": [ "List down the address of patients who have billable period in 2010.", "List down the encounter descriptions of patients who were born in Pittsfield MA US.", "Mention the description of the care plan of American patients.", "What are the medical encounter ids of patients who were born in Pembroke MA US?", "List out the start date of the care plan of alive patients.", "What is the percentage of female patients who started the care plan in 2010?", "Indicate the care plan needed for the patient living at 179 Sydni Roads, Taunton, MA 02780 US.", "Who is the patient involved in the care plan with code 311791003?", "List out full name of patients who have \"Diabetic diet\" in the description of the care plan.", "What is the care plan, procedure, medication and the patient's full name for encounter 6f2e3935-b203-493e-a9c0-f23e847b9798?" ], "topics_from_dp_tables": [ "medical treatments", "electronic health records", "health services", "patient information", "medical records", "healthcare", "patient care", "clinical data", "medical claims", "health insurance claims", "medical billing" ], "topics_from_dpr": [ "medical history", "healthcare services", "patient information", "demographic data", "care plans", "patient profiles" ] }, "thrombosis_prediction": { "dp_tables": { "examination": [ { "desc": "identification of the patient", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "measure of degree of coagulation", "is_derived": false, "name": "rvvt", "norm_name": "rvvt" }, { "desc": "degree of thrombosis", "is_derived": false, "name": "thrombosis", "norm_name": "thrombosis" }, { "desc": "Examination Date", "is_derived": false, "name": "examination date", "norm_name": "examinationdate" } ], "laboratory": [ { "desc": "identification of the patient", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "prothrombin time", "is_derived": false, "name": "pt", "norm_name": "pt" }, { "desc": "creatinine phosphokinase", "is_derived": false, "name": "cpk", "norm_name": "cpk" }, { "desc": "platelet", "is_derived": false, "name": "plt", "norm_name": "plt" }, { "desc": "White blood cell", "is_derived": false, "name": "wbc", "norm_name": "wbc" }, { "desc": "Hemoglobin", "is_derived": false, "name": "hgb", "norm_name": "hgb" }, { "desc": "Date of the laboratory tests (YYMMDD)", "is_derived": false, "name": "date", "norm_name": "date" } ], "patient": [ { "desc": "Set to 1 if the patient's white blood cell count is less than or equal to 3.5 or greater than or equal to 9, otherwise, set to 0", "is_derived": true, "name": "abnormal_white_blood_cell_count", "norm_name": "abnormalwhitebloodcellcount", "provenance": "SELECT id, CASE WHEN wbc <= 3.5 OR wbc >= 9 THEN 1 ELSE 0 END AS result FROM laboratory;", "provenance_cols": { "laboratory": [ "id", "wbc" ] } }, { "desc": "The birthday of the patient.", "is_derived": false, "name": "birthday", "norm_name": "birthday" }, { "desc": "Set to 1 if the patient's level of glutamic oxaloacetic transaminase is greater than or equal to 60, otherwise, set to 0", "is_derived": true, "name": "has_an_abnormal_level_of_glutamic_oxaloacetic_transaminase", "norm_name": "hasanabnormallevelofglutamicoxaloacetictransaminase", "provenance": "SELECT id, CASE WHEN got >= 60 THEN 1 ELSE 0 END AS got_level FROM laboratory;", "provenance_cols": { "laboratory": [ "id" ] } }, { "desc": "set to 1 if the patient has a degree of thrombosis level 2, ANA pattern of only S, and a level of anti-Cardiolip in antibody (IgM) 20% higher than average, otherwise, set to 0", "is_derived": true, "name": "has_thrombosis_2_ANA_S_IgM", "norm_name": "hasthrombosis2anasigm", "provenance": "SELECT CASE WHEN thrombosis = 2 AND \"ana pattern\" = 'S' AND \"acl igm\" > (SELECT AVG(\"acl igm\") * 1.2 FROM examination) THEN 1 ELSE 0 END FROM examination;", "provenance_cols": { "examination": [ "thrombosis", "ana pattern", "acl igm" ] } }, { "desc": "Unique identifier for the patient.", "is_derived": false, "name": "id", "norm_name": "id" }, { "desc": "The number of laboratory examinations where the patient's hematocrit level exceeded 52, replace NULL values with 0.", "is_derived": true, "name": "num_laboratory_examinations_hematoclit_exceed_52", "norm_name": "numlaboratoryexaminationshematoclitexceed52", "provenance": "SELECT COUNT(*) FROM laboratory WHERE COALESCE(hct, 0) > 52;", "provenance_cols": { "laboratory": [ "hct" ] } }, { "desc": "The sex of the patient.", "is_derived": false, "name": "sex", "norm_name": "sex" }, { "desc": "the UA index in the patient's latest laboratory examination result", "is_derived": true, "name": "UA_index_in_latest_laboratory_examination", "norm_name": "uaindexinlatestlaboratoryexamination", "provenance": "SELECT t1.ua FROM laboratory t1 INNER JOIN ( SELECT id, MAX(date) as max_date FROM laboratory GROUP BY id ) t2 ON t1.id = t2.id AND t1.date = t2.max_date", "provenance_cols": { "laboratory": [ "ua", "id", "id", "date" ] } }, { "desc": "the date when a patient came to the hospital", "is_derived": false, "name": "first date", "norm_name": "firstdate" }, { "desc": "disease names", "is_derived": false, "name": "diagnosis", "norm_name": "diagnosis" }, { "desc": "patient was admitted to the hospital (+) or followed at the outpatient clinic (-)", "is_derived": false, "name": "admission", "norm_name": "admission" } ] }, "dprs": [ "Collect data that will allow queries on patient characteristics and laboratory results to predict thrombosis. It should include patient identification, demographic information, and various laboratory examination results, such as hematocrit and white blood cell count, to assess the risk of thrombosis.", "Collect data that will allow queries on patient characteristics and laboratory results to predict thrombosis. It should include patient identification, demographic information, and various laboratory examination results, such as hematocrit levels, white blood cell counts, and enzyme levels. These factors should help assess the risk of thrombosis and abnormal health conditions.", "Collect data that will allow queries on patient health and thrombosis risk. It should include patient identification, demographic information, and laboratory examination results, such as hematocrit and white blood cell count. It should also indicate abnormal levels of certain enzymes and antibodies, which can be used to predict thrombosis." ], "relevant_ques_in_bird": [ "State the ID and age of patient with positive degree of coagulation.", "List all patients who first came to the hospital after year 1992 with prothrombin time (PT) level that are normal.", "Please list the IDs of the patients with no thrombosis and an abnormal level of creatinine phosphokinase.", "Among the patients who have a normal platelet level, how many of them have other symptoms observed?", "Please list a patient's platelet level if it is within the normal range and if he or she is diagnosed with MCTD.", "For patients with severe degree of thrombosis, list their ID, sex and disease the patient is diagnosed with.", "How many of the patients with the most serious thrombosis cases examined in 1997 are women?", "List the patient ID, sex and birthday who has abnormal white blood cell count. Group them by sex and list the patient by age in ascending order.", "Among all outpatients, list out those have low hemoglobin level. State the different IDs and their sex.", "For laboratory examinations take in 1984, list all patients below 50 years old with normal platelet level." ], "topics_from_dp_tables": [ "medical research", "medical examination", "medical diagnosis", "patient care", "blood clot", "laboratory testing", "health risk assessment", "thrombosis" ], "topics_from_dpr": [ "laboratory results", "thrombosis risk assessment", "medical diagnostics", "patient characteristics", "demographic information" ] }, "works_cycles": { "dp_tables": { "address": [ { "desc": "Date and time the record was last updated. ", "is_derived": false, "name": "modifieddate", "norm_name": "modifieddate" }, { "desc": "Unique id number identifying the address.", "is_derived": false, "name": "addressid", "norm_name": "addressid" } ], "department": [ { "desc": "Date and time the record was last updated. ", "is_derived": false, "name": "modifieddate", "norm_name": "modifieddate" }, { "desc": "The unique id number identifying the department.", "is_derived": false, "name": "departmentid", "norm_name": "departmentid" } ], "person": [ { "desc": "Date and time the record was last updated. ", "is_derived": false, "name": "modifieddate", "norm_name": "modifieddate" }, { "desc": "The unique id number identifying the person.", "is_derived": false, "name": "businessentityid", "norm_name": "businessentityid" } ], "product": [ { "desc": "Set to 1 if the product does not have a work order, 0 otherwise.", "is_derived": true, "name": "does_not_have_work_order", "norm_name": "doesnothaveworkorder", "provenance": "SELECT p.productid, CASE WHEN w.workorderid IS NULL THEN 1 ELSE 0 END AS has_work_order FROM product p LEFT JOIN workorder w ON p.productid = w.productid;", "provenance_cols": { "product": [ "productid" ], "workorder": [ "workorderid", "productid" ] } }, { "desc": "Set to 1 if the product has more than 1 price changes, 0 otherwise.", "is_derived": true, "name": "has_over_1_price_changes", "norm_name": "hasover1pricechanges", "provenance": "SELECT p.productid, CASE WHEN COUNT(DISTINCT plph.listprice) > 1 THEN 1 ELSE 0 END AS price_change_flag FROM product p LEFT JOIN productlistpricehistory plph ON p.productid = plph.productid GROUP BY p.productid", "provenance_cols": { "product": [ "productid" ], "productlistpricehistory": [ "listprice", "productid" ] } }, { "desc": "Product quality class", "is_derived": false, "name": "class", "norm_name": "class" }, { "desc": "Name of the product.", "is_derived": false, "name": "modifieddate", "norm_name": "modifieddate" }, { "desc": "The number of orders the product has, replace null values with 0.", "is_derived": true, "name": "num_orders", "norm_name": "numorders", "provenance": "SELECT p.productid, COALESCE(o.order_count, 0) AS order_count FROM product p LEFT JOIN ( SELECT productid, COUNT(salesorderid) AS order_count FROM salesorderdetail GROUP BY productid ) o ON p.productid = o.productid;", "provenance_cols": { "product": [ "productid", "productid" ], "salesorderdetail": [ "salesorderid" ] } }, { "desc": "The number of reviews the product has received, replace null values with 0.", "is_derived": true, "name": "num_reviews", "norm_name": "numreviews", "provenance": "SELECT COALESCE(COUNT(pr.productreviewid), 0) FROM productreview pr WHERE pr.productid = ?;", "provenance_cols": { "productreview": [ "productreviewid", "productid" ] } }, { "desc": "The unique product identification number.", "is_derived": false, "name": "productnumber", "norm_name": "productnumber" }, { "desc": "Set to 1 if the product is sold by more than 2 vendors, 0 otherwise.", "is_derived": true, "name": "sold_by_over_2_vendors", "norm_name": "soldbyover2vendors", "provenance": "SELECT p.productid, CASE WHEN pv.vendor_count > 2 THEN 1 ELSE 0 END AS is_sold_by_more_than_two_vendors FROM product p JOIN (SELECT productid, COUNT(businessentityid) AS vendor_count FROM productvendor GROUP BY productid) pv ON p.productid = pv.productid;", "provenance_cols": { "product": [ "productid", "productid" ], "productvendor": [ "businessentityid" ] } }, { "desc": "Selling price", "is_derived": false, "name": "listprice", "norm_name": "listprice" }, { "desc": "Name of the product.", "is_derived": false, "name": "name", "norm_name": "name" }, { "desc": "The unique id number identifying the product.", "is_derived": false, "name": "productid", "norm_name": "productid" }, { "desc": "Whether the product is salable or not.", "is_derived": false, "name": "finishedgoodsflag", "norm_name": "finishedgoodsflag" }, { "desc": "The source of product make.", "is_derived": false, "name": "makeflag", "norm_name": "makeflag" }, { "desc": "Product Routine", "is_derived": false, "name": "productline", "norm_name": "productline" }, { "desc": "Standard cost of the product.", "is_derived": false, "name": "standardcost", "norm_name": "standardcost" } ], "productreview": [ { "desc": "comments", "is_derived": false, "name": "comments", "norm_name": "comments" }, { "desc": "Product identification number.", "is_derived": false, "name": "productid", "norm_name": "productid" }, { "desc": "Product rating given by the reviewer. ", "is_derived": false, "name": "rating", "norm_name": "rating" }, { "desc": "The name of reviewer.", "is_derived": false, "name": "reviewername", "norm_name": "reviewername" }, { "desc": "The unique id numbers identifying product reviews.", "is_derived": false, "name": "productreviewid", "norm_name": "productreviewid" } ], "salesorderdetail": [ { "desc": "productid", "is_derived": false, "name": "productid", "norm_name": "productid" }, { "desc": "orderqty", "is_derived": false, "name": "orderqty", "norm_name": "orderqty" }, { "desc": "salesorderdetailid", "is_derived": false, "name": "salesorderdetailid", "norm_name": "salesorderdetailid" } ], "shoppingcartitem": [ { "desc": "Product ordered.", "is_derived": false, "name": "productid", "norm_name": "productid" }, { "desc": "Product quantity ordered.", "is_derived": false, "name": "quantity", "norm_name": "quantity" }, { "desc": "The unique id number identifying the shopping cart item records.", "is_derived": false, "name": "shoppingcartitemid", "norm_name": "shoppingcartitemid" } ], "specialoffer": [ { "desc": "The unique id number identifying the special offer.", "is_derived": false, "name": "specialofferid", "norm_name": "specialofferid" }, { "desc": "Discount description.", "is_derived": false, "name": "description", "norm_name": "description" } ], "specialofferproduct": [ { "desc": "Product identification number.", "is_derived": false, "name": "productid", "norm_name": "productid" }, { "desc": "The id for SpecialOfferProduct records", "is_derived": false, "name": "specialofferid", "norm_name": "specialofferid" } ] }, "dprs": [ "Collect data that will allow queries on products and their associated information, including location, sales, and reviews. It should provide details about products, such as names and identifiers, as well as indicators of sales activity and vendor information. It should support examination of product performance and market trends.", "Collect data that will allow queries on products and their associated information, including location, sales, and customer feedback, allowing for insights into product performance and vendor relationships.", "Collect data that will allow queries on product information, including geographical locations and vendor details. It should provide insights into product sales, pricing, and customer reviews, as well as work order status. It should also include details to understand product performance and trends." ], "relevant_ques_in_bird": [ "List all product names that are high in quality. Please also state its selling price.", "List all the names of products with the special offer \"15\".", "Please list the top 5 products with the most orders.", "Please list the names of the products that get over 10 reviews and a salable.", "Please list the top 3 house-manufactured products with the highest average rating.", "State the product name, product line, rating and the selling price of product with the lowest rating.", "What is the total profit gained by the company from the product that has the highest amount of quantity ordered from online customers? Indicate the name of the product.", "Please list the product names of all the products on the LL Road Frame Sale.", "List down the product name, reviewer name, rating and comments for product under the road line." ], "topics_from_dp_tables": [ "online shopping", "business operations", "product management", "e-commerce", "product review", "sales order", "shopping cart" ], "topics_from_dpr": [ "customer feedback", "product information", "geographical locations", "product performance", "vendor information", "market trends", "sales data" ] }, "world_development_indicators": { "dp_tables": { "country": [ { "desc": "The region of the country.", "is_derived": false, "name": "region", "norm_name": "region" }, { "desc": "The short name of the country.", "is_derived": false, "name": "shortname", "norm_name": "shortname" }, { "desc": "unique code identifying countries", "is_derived": false, "name": "countrycode", "norm_name": "countrycode" }, { "desc": "Lending category", "is_derived": false, "name": "lendingcategory", "norm_name": "lendingcategory" }, { "desc": "External Debt Reporting Status", "is_derived": false, "name": "externaldebtreportingstatus", "norm_name": "externaldebtreportingstatus" }, { "desc": "income level of countries", "is_derived": false, "name": "incomegroup", "norm_name": "incomegroup" }, { "desc": "2 digit code of countries", "is_derived": false, "name": "alpha2code", "norm_name": "alpha2code" }, { "desc": "world bank to code", "is_derived": false, "name": "wb2code", "norm_name": "wb2code" } ], "countrynotes": [ { "desc": "The average adolescent fertility rate of the country.", "is_derived": true, "name": "average_adolescent_fertility_rate", "norm_name": "averageadolescentfertilityrate", "provenance": "SELECT AVG(value) FROM indicators WHERE indicatorname = 'Adolescent fertility rate (births per 1,000 women ages 15-19)';", "provenance_cols": { "indicators": [ "value", "indicatorname" ] } }, { "desc": "Unique identifier for the country.", "is_derived": false, "name": "countrycode", "norm_name": "countrycode" }, { "desc": "Set to 1 if the country is under the lending category of the International Development Associations and has a external debt reporting finished by estimation, otherwise, set to 0.", "is_derived": true, "name": "is_under_IDA_and_finish_estimate", "norm_name": "isunderidaandfinishestimate", "provenance": "SELECT CASE WHEN lendingcategory = 'IDA' AND externaldebtreportingstatus = 'Estimation' THEN 1 ELSE 0 END FROM country;", "provenance_cols": { "country": [ "lendingcategory", "externaldebtreportingstatus" ] } }, { "desc": "The lowest value of the indicator HPS in the period 1960 to 1965.", "is_derived": true, "name": "lowest_value_indicator_HPS_1960_to_1965", "norm_name": "lowestvalueindicatorhps1960to1965", "provenance": "SELECT MIN(value) FROM indicators WHERE indicatorname = 'HPS' AND year BETWEEN 1960 AND 1965;", "provenance_cols": { "indicators": [ "value", "indicatorname" ] } }, { "desc": "The number of footnotes have been made in year 1980 in the country, replace NULL values with 0.", "is_derived": true, "name": "number_of_footnotes_1980", "norm_name": "numberoffootnotes1980", "provenance": "SELECT COUNT(description) FROM footnotes WHERE year = '1980' AND countrycode IS NOT NULL AND seriescode IS NOT NULL;", "provenance_cols": { "footnotes": [ "description", "countrycode", "seriescode" ] } }, { "desc": "The percentage of increase of the indicator on Adolescent fertility rate from 1960 to 1961 in the country", "is_derived": true, "name": "percentage_increase_Adolescent_1960_to_1961", "norm_name": "percentageincreaseadolescent1960to1961", "provenance": "SELECT ((SUM(CASE WHEN year = 1961 THEN value ELSE 0 END) - SUM(CASE WHEN year = 1960 THEN value ELSE 0 END)) / SUM(CASE WHEN year = 1960 THEN value ELSE 0 END)) * 100 AS percentage_increase FROM indicators WHERE indicatorname = 'Adolescent fertility rate (births per 1,000 women ages 15-19)';", "provenance_cols": { "indicators": [ "value", "indicatorname" ] } }, { "desc": "description", "is_derived": false, "name": "description", "norm_name": "description" } ], "footnotes": [ { "desc": "code identifying unique countries", "is_derived": false, "name": "countrycode", "norm_name": "countrycode" }, { "desc": "Description of country footnotes", "is_derived": false, "name": "description", "norm_name": "description" } ], "indicators": [ { "desc": "Series code of countries", "is_derived": false, "name": "countrycode", "norm_name": "countrycode" }, { "desc": "value", "is_derived": false, "name": "value", "norm_name": "value" }, { "desc": "code identifying unique countries", "is_derived": false, "name": "countryname", "norm_name": "countryname" }, { "desc": "indicator name", "is_derived": false, "name": "indicatorname", "norm_name": "indicatorname" }, { "desc": "year", "is_derived": false, "name": "year", "norm_name": "year" } ], "series": [ { "desc": "Indicator Name", "is_derived": false, "name": "indicatorname", "norm_name": "indicatorname" }, { "desc": "Long Definition of series ", "is_derived": false, "name": "longdefinition", "norm_name": "longdefinition" }, { "desc": "unique code identifying series", "is_derived": false, "name": "seriescode", "norm_name": "seriescode" } ] }, "dprs": [ "Collect data that will allow queries on various development indicators across countries, including fertility rates, economic metrics, and regional classifications, allowing for insights into country-specific trends and global comparisons.", "Collect data that will allow queries on various development indicators across countries, including fertility rates, economic factors, and regional classifications, allowing for insights into country-specific trends and comparisons.", "Collect data that will allow queries on various development indicators across countries, including adolescent fertility rates, income levels, and regional classifications, allowing for insights into economic and social trends." ], "relevant_ques_in_bird": [ "Please list the countries under the lending category of the International Development Associations and have a external debt reporting finished by estimation.", "Which country have data classified as official aid?", "Which countries have a fertility rate between 4 and 5 in 1979? List their names.", "List out the name and indicator code of high income: nonOECD countries", "What is the average adolescent fertility rate of the country whose Alpha2Code is 1A over the years this indicator was calculated.", "List down the World Bank code of the countries whose country note has described \"Data source : Human Mortality Database by University of California, Berkeley, and Max Planck Institute for Demographic Research.\"? Please include their lending category.", "Among the low income countries, which country has the lowest fertility rate?", "What's the value of the indicator whose long definition is \"Adolescent fertility rate is the number of births per 1,000 women ages 15-19.\" for the Arab World in 1960?" ], "topics_from_dp_tables": [ "sustainable development", "economic indicators", "socioeconomic development", "economy and development", "world development", "international development", "global statistics", "global economy", "development research", "poverty reduction" ], "topics_from_dpr": [ "fertility rates", "socioeconomic trends", "development indicators", "global comparisons", "regional classifications", "economic metrics" ] } }