Chinastark/bird_dataset huggingface dataset:
Database: image_and_language
Question: Which object has the highest attribute classes?
Evidence: object has the highest attribute classes refers to OBJ_SAMPLE_ID where MAX(COUNT(OBJ_SAMPLE_ID));
SQL: SELECT OBJ_SAMPLE_ID FROM IMG_OBJ_ATT GROUP BY OBJ_SAMPLE_ID ORDER BY COUNT(OBJ_SAMPLE_ID) DESC LIMIT 1
Database: image_and_language
Question: What is the ratio between the number of object samples in image 1 and the number of object samples in image 6?
Evidence: DIVIDE(SUM(OBJ_SAMPLE_ID where IMG_ID = 1), SUM(OBJ_SAMPLE_ID where IMG_ID = 6));
SQL: SELECT CAST(SUM(CASE WHEN IMG_ID = 1 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN IMG_ID = 6 THEN 1 ELSE 0 END) FROM IMG_OBJ
Database: image_and_language
Question: Calculate the average of object samples for the image.
Evidence: DIVIDE(COUNT(OBJ_SAMPLE_ID), COUNT(IMG_ID));
SQL: SELECT CAST(COUNT(OBJ_SAMPLE_ID) AS REAL) / COUNT(DISTINCT IMG_ID) FROM IMG_OBJ
Database: image_and_language
Question: List all the IDs of images that have objects with the attributes of 'wired'.
Evidence: IDs of images refer to IMG_ID; objects with the attributes of 'wired' refer to ATT_CLASS = 'wired';
SQL: SELECT DISTINCT T2.IMG_ID FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'wired'
Database: image_and_language
Question: List all the object classes in image 10.
Evidence: object classes refer to OBJ_CLASS; image 10 refers to IMG_ID = 10;
SQL: SELECT DISTINCT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 10
Database: image_and_language
Question: List attributes for object class 'tip' In image 1314.
Evidence: attributes for object refer to ATT_CLASS; class 'tip' in image 1314 refers to OBJ_CLASS = 'tip' where IMG_ID = 1314;
SQL: SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T3.IMG_ID = 1314 AND T4.OBJ_CLASS = 'tip'
Database: image_and_language
Question: What is the prediction class between object class 'chain' and 'label' in image 2360078?
Evidence: prediction class refers to PRED_CLASS; object class 'chain' refers to OBJ_CLASS = 'chain'; object class 'label' refers to OBJ_CLASS = 'label'; image 2360078 refers to IMG_ID = 2360078;
SQL: SELECT DISTINCT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T2.PRED_CLASS_ID = T1.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T1.IMG_ID = T3.IMG_ID AND T1.OBJ1_SAMPLE_ID = T3.OBJ_SAMPLE_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T1.IMG_ID = 2360078 AND T1.OBJ1_SAMPLE_ID = 15 OR T1.OBJ2_SAMPLE_ID = 18
Database: image_and_language
Question: How many images have objects with the attributes of polka dot?
Evidence: attributes of polka dot refer to ATT_CLASS = 'polka dot'; images refer to IMG_ID;
SQL: SELECT COUNT(T2.OBJ_SAMPLE_ID) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'polka dot'
Database: image_and_language
Question: What are the attributes of the widest object in image 400?
Evidence: attributes refer to ATT_CLASS; the widest relates to the width of the bounding
box of the object which refers to MAX(W); image 400 refers to IMG_ID = 400;
SQL: SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T2.IMG_ID = 400 ORDER BY T3.W DESC LIMIT 1
Database: image_and_language
Question: State the name of the object class that has in most images.
Evidence: object class that has in most images refers to OBJ_CLASS where MAX(COUNT(OBJ_CLASS_ID));
SQL: SELECT OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID GROUP BY T2.OBJ_CLASS ORDER BY COUNT(T1.OBJ_CLASS_ID) DESC LIMIT 1
Database: image_and_language
Question: State the width and height of the object with the class of 'van' in image 1.
Evidence: The bounding box's W and H abbreviations stand for the object's width and height respectively; class of 'van' in image 1 refers to OBJ_CLASS = 'van' where IMG_ID = 1;
SQL: SELECT T1.H, T1.W FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 1 AND T2.OBJ_CLASS = 'van'
Database: image_and_language
Question: State the coordinate of X and Y for the object with the attribute of 'sparse' in image 1.
Evidence: coordinates of X and Y for the object refer to X and Y coordinates of the bounding box; attribute of 'sparse' in image 1 refers to IMG_ID = 1 where ATT_CLASS = 'sparse';
SQL: SELECT T3.OBJ_SAMPLE_ID, T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.IMG_ID = 1 AND T1.ATT_CLASS = 'sparse'
Database: image_and_language
Question: Calculate the percentage of object samples that are related to street lights.
Evidence: DIVIDE(COUNT(OBJ_SAMPLE_ID where OBJ_CLASS = 'street lights'), COUNT(OBJ_SAMPLE_ID)) as percentage;
SQL: SELECT CAST(SUM(CASE WHEN T2.OBJ_CLASS = 'street lights' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OBJ_SAMPLE_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID
Database: image_and_language
Question: Based on image 5, what is the percentage of images that belong windows object class?
Evidence: DIVIDE(COUNT(OBJ_SAMPLE_ID where OBJ_CLASS = 'windows' and IMG_ID = 5), COUNT(OBJ_SAMPLE_ID where IMG_ID = 5)) as percentage;
SQL: SELECT CAST(COUNT(T1.OBJ_SAMPLE_ID) AS REAL) * 100 / COUNT(CASE WHEN T1.IMG_ID = 5 THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'windows'
Database: image_and_language
Question: How many images have an x-coordinate of 5 and y-coordinate of 5?
Evidence: X and Y refer to coordinates of the bounding box where X = 5 and Y = 5; images refer to IMG_ID;
SQL: SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE X = 5 AND Y = 5
Database: image_and_language
Question: How many images have less than 15 object samples?
Evidence: images refer to IMG_ID; less than 15 object samples refer to COUNT(OBJ_SAMPLE_ID) < 15;
SQL: SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE OBJ_SAMPLE_ID < 15
Database: image_and_language
Question: How many images have a total of 10 attribute classes?
Evidence: images refer to IMG_ID; total of 10 attribute classes refers to COUNT(OBJ_CLASS_ID) = 10;
SQL: SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE OBJ_CLASS_ID = 10
Database: image_and_language
Question: List the ID of all images with objects that have multiple relations.
Evidence: ID of all images refer to IMG_ID; if two objects (OBJ1_SAMPLE_ID,
OBJ2_SAMPLE_ID) has
multiple PRED_CLASS_ID, it
means these two objects
have multiple relations;
SQL: SELECT IMG_ID FROM IMG_REL GROUP BY PRED_CLASS_ID HAVING COUNT(DISTINCT OBJ1_SAMPLE_ID) != 0 AND COUNT(DISTINCT OBJ2_SAMPLE_ID) != 0
Database: image_and_language
Question: How many images have "vegetable" and "fruits" as their object classes?
Evidence: images refer to IMG_ID; "vegetables" and "fruits" as object classes refer to OBJ_CLASS = 'vegetables' and OBJ_CLASS = 'fruits';
SQL: SELECT COUNT(T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'vegetables' OR T2.OBJ_CLASS = 'fruits'
Database: image_and_language
Question: What is the image ID with a predicted class of "parked on"?
Evidence: predicted class of "parked on" refers to PRED_CLASS = 'parked on';
SQL: SELECT DISTINCT T1.IMG_ID FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.PRED_CLASS = 'parked on'
Database: image_and_language
Question: List all the object classes of the images that have a (5,5) coordinate.
Evidence: object classes refer to OBJ_CLASS; (5,5) coordinates refer to X and Y coordinates of the bounding box where X = 5 and Y = 5;
SQL: SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 5 AND T1.Y = 5
Database: image_and_language
Question: How many images have "keyboard" as their object class?
Evidence: images refer to IMG_ID; "keyboard" as object class refers to OBJ_CLASS = 'keyboard';
SQL: SELECT COUNT(T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'keyboard'
Database: image_and_language
Question: What are the width and height of the bounding box of the object with "keyboard" as their object class and (5, 647) as their coordinate?
Evidence: The bounding box's W and H abbreviations stand for the object's width and height respectively; "keyboard" as object class refers to OBJ_CLASS = 'keyboard'; (5, 647) as coordinate refers to X and Y coordinates of the bounding box where X = 5 and Y = 647;
SQL: SELECT T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'keyboard' AND T1.X = 5 AND T1.Y = 647
Database: image_and_language
Question: List all the ID of the images that have an attribute class of "horse".
Evidence: ID of all images refer to IMG_ID; attribute class of "horse" refers to ATT_CLASS = 'horse';
SQL: SELECT T2.IMG_ID FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'horse'
Database: image_and_language
Question: Provide the x-coordinate and y-coordinate of the image with an attribute class of ''horse" and an object class of "fur".
Evidence: attribute class of "horse" refers to ATT_CLASS = 'horse'; object class of "fur" refers to OBJ_CLASS = 'fur';
SQL: SELECT T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T1.ATT_CLASS = 'horse' AND T4.OBJ_CLASS = 'fur'
Database: image_and_language
Question: List all the attribute classes of the image ID "15".
Evidence: attribute classes of the image ID "15" refer to ATT_CLASS where IMG_ID = 15;
SQL: SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.IMG_ID = 15
Database: image_and_language
Question: For those objects that have multiple relations, how many images have a prediction class of "reading"?
Evidence: prediction class of "reading" refers to PRED_CLASS = 'reading'; if two objects (OBJ1_SAMPLE_ID,
OBJ2_SAMPLE_ID) has
multiple PRED_CLASS_ID, it
means these two objects
have multiple relations;
SQL: SELECT COUNT(T1.IMG_ID) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.PRED_CLASS = 'reading'
Database: image_and_language
Question: How many images have "picture" as their attribute class?
Evidence: images have "picture" as their attribute class refer to IMG_ID where ATT_CLASS = 'picture';
SQL: SELECT COUNT(T2.IMG_ID) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'picture'
Database: image_and_language
Question: How many images have "picture" as their attribute class and "bear" as their object class?
Evidence: "picture" as attribute class refers to ATT_CLASS = 'picture'; "bear" as object class refers to OBJ_CLASS = 'bear'; images refer to IMG_ID;
SQL: SELECT COUNT(T2.IMG_ID) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T1.ATT_CLASS = 'picture' AND T4.OBJ_CLASS = 'bear'
Database: image_and_language
Question: List all the attribute classes of the images that have a (5,5) coordinate.
Evidence: attribute classes refer to ATT_CLASS; (5,5) coordinate refers to X and Y coordinates of the bounding box where X = 5 and Y = 5;
SQL: SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.X = 5 AND T3.Y = 5
Database: image_and_language
Question: Calculate the average number of images with an attribute class of "keyboard".
Evidence: AVG(IMG_ID) where OBJ_CLASS = 'keyboard';
SQL: SELECT AVG(T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'keyboard'
Database: image_and_language
Question: Calculate the ratio of the total number of images with an object class of "man" and "person".
Evidence: DIVIDE(COUNT(IMG_ID where OBJ_CLASS = 'man'), COUNT(IMG_ID where OBJ_CLASS = 'person'));
SQL: SELECT CAST(COUNT(CASE WHEN T2.OBJ_CLASS = 'man' THEN 1 ELSE 0 END) AS REAL) / COUNT(CASE WHEN T2.OBJ_CLASS = 'person' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID
Database: image_and_language
Question: List the object sample IDs of image ID 17 with coordinates (0,0).
Evidence: object sample ID refers to OBJ_SAMPLE_ID; image ID 17 refers to IMG_ID = 17; coordinates (0,0) refer to X and Y coordinates of the bounding box where X = 0 and Y = 0;
SQL: SELECT OBJ_SAMPLE_ID FROM IMG_OBJ WHERE IMG_ID = 17 AND X = 0 AND Y = 0
Database: image_and_language
Question: List all bounding box widths and heights of object sample ID 2.
Evidence: The bounding box's W and H abbreviations stand for the object's width and height respectively; object sample ID 2 refers to OBJ_SAMPLE_ID = 2;
SQL: SELECT W, H FROM IMG_OBJ WHERE OBJ_SAMPLE_ID = 2
Database: image_and_language
Question: In the Y coordinate of image ID 12, how many are 0?
Evidence: Y coordinate many are 0 refers to Y coordinates of the bounding box where Y = 0; image ID 12 refers to IMG_ID = 12;
SQL: SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE IMG_ID = 12 AND Y = 0
Database: image_and_language
Question: List all the attribute classes of image ID 22.
Evidence: attribute classes of image ID 22 refer to ATT_CLASS where MG_ID = 22;
SQL: SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.IMG_ID = 22
Database: image_and_language
Question: List the object classes of image ID 36 with coordinates (0,0).
Evidence: object classes of image ID 36 refers to OBJ_CLASS where IMG_ID = 36; coordinates (0,0) refer to X and Y coordinates of the bounding box where X = 0 and Y = 0;
SQL: SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 36 AND T1.X = 0 AND T1.Y = 0
Database: image_and_language
Question: Write 10 coordinates with the object class "pizza."
Evidence: coordinates for the object refer to X, Y, W and H coordinates of the bounding box; object class "pizza" refers to OBJ_CLASS = 'pizza';
SQL: SELECT T1.IMG_ID, T1.X, T1.Y FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'pizza' LIMIT 10
Database: image_and_language
Question: What object class is in the X and Y coordinates of 126 and 363?
Evidence: object class refers to OBJ_CLASS; X and Y coordinates of 126 and 363 refer to coordinates of the bounding box where X = 126 and Y = 363;
SQL: SELECT T1.IMG_ID, T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 126 AND T1.Y = 363
Database: image_and_language
Question: What is the most common object class of image ID 56?
Evidence: the most common object class of image ID 56 refers to MAX(COUNT(OBJ_CLASS_ID)) where IMG_ID = 56;
SQL: SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 56 GROUP BY T2.OBJ_CLASS ORDER BY COUNT(T2.OBJ_CLASS_ID) DESC LIMIT 1
Database: image_and_language
Question: Write the object classes of image ID 22 alongside the object's width and height.
Evidence: object classes of image ID 22 refers to OBJ_CLASS where IMG_ID = 22; the object's width and heigh refer to W and H coordinates of the bounding box respectively;
SQL: SELECT T1.W, T1.H, T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 22
Database: image_and_language
Question: What is the predicate class of image ID 68?
Evidence: predicate class of image ID 68 refers to PRED_CLASS where IMG_ID = 68;
SQL: SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 68
Database: image_and_language
Question: How many 'has' predicate classes does image ID 107 have?
Evidence: has' predicate classes refers to PRED_CLASS = 'has'; image ID 107 refers to IMG_ID = 107;
SQL: SELECT COUNT(T2.PRED_CLASS) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 107 AND T2.PRED_CLASS = 'has'
Database: image_and_language
Question: Name the most common predicate class of image ID 4434.
Evidence: the most common predicate class of image ID 4434 MAX(PRED_CLASS) where IMG_ID = 4434;
SQL: SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 4434 ORDER BY T2.PRED_CLASS DESC LIMIT 1
Database: image_and_language
Question: Count the number of 'dress' object classes and include their X and Y coordinates in image ID 1764.
Evidence: dress' object classes refer to OBJ_CLASS = 'dress'; image ID 1764 refers to IMG_ID = 1764; X and Y refer to coordinates of the bounding box;
SQL: SELECT T1.X, T1.Y FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 1764 AND T2.OBJ_CLASS = 'dress'
Database: image_and_language
Question: Give the X and Y coordinates of the sample object of image ID 23 that has the 'cast' attribute class.
Evidence: X and Y refer to coordinates of the bounding box; image ID 23 refers to IMG_ID = 23; 'cast' attribute class refers to ATT_CLASS = 'cast';
SQL: SELECT T3.OBJ_SAMPLE_ID, T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.IMG_ID = 23 AND T1.ATT_CLASS = 'cast'
Database: image_and_language
Question: How many 'blue' attribute classes are there on image ID 2355735?
Evidence: blue' attribute classes on image ID 2355735 refer to ATT_CLASS = 'blue' where IMG_ID = 2355735;
SQL: SELECT COUNT(T1.ATT_CLASS) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.IMG_ID = 2355735 AND T1.ATT_CLASS = 'blue'
Database: image_and_language
Question: What is the average width and height of the objects in image ID 47? List their object classes as well.
Evidence: The bounding box's W and H abbreviations stand for the object's width and height in which average width and height refer to AVG(W) and AVG(H) respectively; image ID 47 refers to IMG_ID = 47; object classes refer to OBJ_CLASS;
SQL: SELECT T2.OBJ_CLASS, AVG(T1.W), AVG(T1.H) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 47 GROUP BY T2.OBJ_CLASS
Database: hockey
Question: List the first Name and last name of all players not from USA and who are born in 1990 .
Evidence: Not from USA refers to birthCountry! = 'USA'; born in 1990 refers to birthYear = 1990

SQL: SELECT firstName, lastName FROM Master WHERE birthYear = 1990 AND birthCountry != 'USA'
Database: hockey
Question: List all players' given name who are good at both left and right hand and playing the forward position.
Evidence: good at both left and right hand refers to shootCatch IS NULL;  playing the forward position refers to pos = 'F'
SQL: SELECT nameGiven FROM Master WHERE shootCatch IS NULL AND pos = 'F'
Database: hockey
Question: Who are the players who were not in the Hall of Fame list.
Evidence: not in the Hall of Fame refers to hofID IS NULL
SQL: SELECT firstName, lastName FROM Master WHERE hofID IS NULL
Database: hockey
Question: Who is the youngest player who is still living. State the given name and date of birth.
Evidence: still living refers to deathYear IS NULL; youngest refers to MAX(birthYear,birthMon,birthDay)
SQL: SELECT nameGiven , nameGiven , birthYear, birthMon, birthDay FROM Master WHERE deathYear IS NULL ORDER BY birthYear DESC, birthMon DESC, birthday DESC LIMIT 1
Database: hockey
Question: For all the deceased players who are good at both left and right hand, list the player's name and the age when he died.
Evidence: age when he died refers to SUBTRACT(deathYear,birthYear); deceased refers to deathYear IS NOT NULL; good at both left and right hand refers to shootCatch IS NULL
SQL: SELECT firstName, lastName, deathYear - birthYear FROM Master WHERE shootCatch IS NULL AND deathYear IS NOT NULL
Database: hockey
Question: Name the goalies who played for more than two teams from Year 2000 to 2005.
Evidence: goalie who played for more than 2 teams refers to COUNT(DISTINCT(T2.tmID))>2
SQL: SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.year >= 2000 AND T2.year <= 2005 GROUP BY T2.playerID HAVING COUNT(DISTINCT T2.tmID) > 2
Database: hockey
Question: What is the average weight of players who have height greater than 72 inches.
Evidence: average weight refers to AVG(weight); height greater than 72 inches refers to height>72
SQL: SELECT AVG(weight) FROM Master WHERE height > 72
Database: hockey
Question: Name the goalies who have played more than total of 5000 minutes in the all the season played. State given name of the player and from which country was he born.
Evidence: played more than total of 5000 minutes refers to SUM(Min)>5000;country he was born refers to birthCountry

SQL: SELECT DISTINCT T1.nameGiven, T1.birthCountry FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID GROUP BY T1.nameGiven, T1.birthCountry HAVING SUM(T2.Min) > 5000
Database: hockey
Question: Name the goaltenders who had played in both PCHA and NHL league.
Evidence: PCHA refers to lgID = 'PCHA'; NHL league refers to lgID = 'NHL'
SQL: SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.lgID IN ('PCHA', 'NHL') GROUP BY T2.playerID HAVING COUNT(DISTINCT T2.lgID) > 1
Database: hockey
Question: List all deceased goalies by last name. List the season where he had the most time played.
Evidence: deceased refers to deathYear; most time played refers to MAX(Min)
SQL: SELECT T1.playerID, T2.year, Min FROM Master AS T1 INNER JOIN Goalies AS T2 ON T2.playerID = T1.playerID WHERE T1.deathYear IS NOT NULL ORDER BY T2.Min DESC LIMIT 1
Database: hockey
Question: List all goalies from year 2000 to 2010 for team COL. State their given name, height, weight and age of today.
Evidence: team COL refers to tmID = 'COL'; age of today refers to SUBTRACT(YEAR(NOW())-birthYear)
SQL: SELECT T1.nameGiven, T1.height , T1.weight, STRFTIME('%Y', CURRENT_TIMESTAMP) - birthYear FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.tmID = 'COL' AND T2.year >= 2000 AND T2.year <= 2010 GROUP BY T1.playerID
Database: hockey
Question: Name all goalies with 10 or more empty net goals. Name the players and season where he played.
Evidence: 10 or more empty net goals refers to ENG> = 10; season refers to year
SQL: SELECT T1.firstName, T1.lastName , T2.year FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.ENG >= 10
Database: hockey
Question: 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.
Evidence: goals against refers to GA; shots against refers to SA; lowest percentage of goals against among all the shots against refers to MIN(DIVIDE(GA,SA)*100)
SQL: SELECT T1.firstName, T1.lastName, T2.year FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE CAST(T2.GA AS REAL) / T2.SA IS NOT NULL ORDER BY CAST(T2.GA AS REAL) / T2.SA LIMIT 1