Chinastark/bird_dataset huggingface dataset:
Database: works_cycles
Question: What is the average profit of all the products from the Clothing category?
Evidence: average profit = DIVIDE(SUM(SUBTRACT(ListPrice, StandardCost))), (COUNT(ProductSubcategoryID))));
SQL: SELECT SUM(T1.ListPrice - T1.StandardCost) / COUNT(T1.ProductID) FROM Product AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID INNER JOIN ProductCategory AS T3 ON T2.ProductCategoryID = T3.ProductCategoryID WHERE T3.Name = 'Clothing'
Database: works_cycles
Question: Which product cost the least in 2013?
Evidence: cost refers to StandardCost; cost the least refers to MIN(StandardCost);
SQL: SELECT ProductID FROM ProductCostHistory WHERE StartDate LIKE '2013%' ORDER BY StandardCost LIMIT 1
Database: works_cycles
Question: List all products with the color yellow.
SQL: SELECT ProductID FROM Product WHERE Color = 'Yellow'
Database: works_cycles
Question: What is the bussiness id for Mr. Hung-Fu Ting?
Evidence: business id refers to BusinessEntityID;
SQL: SELECT BusinessEntityID FROM Person WHERE Title = 'Mr.' AND FirstName = 'Hung-Fu' AND LastName = 'Ting'
Database: works_cycles
Question: What is the phone number of the person with id "12597"?
Evidence: person with id refers to BusinessEntityID;
SQL: SELECT PhoneNumber FROM PersonPhone WHERE BusinessEntityID = 12597
Database: works_cycles
Question: What is the price for the product with the id "912"?
Evidence: price refers to ListPrice;
SQL: SELECT ListPrice FROM ProductListPriceHistory WHERE ProductID = 912
Database: works_cycles
Question: Is there a work order where the planned cost is different from the actual cost?
Evidence: planned cost is different from actual cost refers to ActualCost ! = PlannedCost;
SQL: SELECT CASE WHEN ActualCost = PlannedCost THEN 'No' ELSE 'Yes' END FROM WorkOrderRouting
Database: works_cycles
Question: What is the thumbnail photo file for the product with the id "979"?
Evidence: thumbnail photo file refers to ThumbnailPhotoFileName;
SQL: SELECT T2.ThumbnailPhotoFileName FROM ProductProductPhoto AS T1 INNER JOIN ProductPhoto AS T2 ON T1.ProductPhotoID = T2.ProductPhotoID WHERE T1.ProductID = 979
Database: works_cycles
Question: List all the names of the products with the price of more than 1000$.
Evidence: ListPrice>1000;
SQL: SELECT DISTINCT T2.Name FROM ProductListPriceHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ListPrice > 1000
Database: works_cycles
Question: What is the product with the most profit?
Evidence: profit = SUBTRACT(ListPrice, StandardCost);
SQL: SELECT T1.ProductID FROM ProductListPriceHistory AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.ListPrice - T2.StandardCost DESC LIMIT 1
Database: works_cycles
Question: What is the name of the product stored in location 1 compartment L container 6?
Evidence: compartment refers to Shelf;
SQL: SELECT T2.Name FROM ProductInventory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.LocationID = 1 AND T1.Shelf = 'L' AND T1.Bin = 6
Database: works_cycles
Question: What are locations of the work order "35493"?
SQL: SELECT T2.Name FROM WorkOrderRouting AS T1 INNER JOIN Location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.WorkOrderID = 35493
Database: works_cycles
Question: What are the products with a large photo?
Evidence: product with large photo refers to LargePhoto NOT null;
SQL: SELECT T2.ProductID FROM ProductPhoto AS T1 INNER JOIN ProductProductPhoto AS T2 ON T1.ProductPhotoID = T2.ProductPhotoID WHERE T1.LargePhotoFileName LIKE '%large.gif'
Database: works_cycles
Question: List all the socks products.
Evidence: Socks is a name of product subcategory
SQL: SELECT T2.ProductID FROM ProductSubcategory AS T1 INNER JOIN Product AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID WHERE T1.Name = 'Socks'
Database: works_cycles
Question: With 100$, how many Cable Lock can you buy?
Evidence: number of products a $100 can buy = DIVIDE(100, ListPrice);
SQL: SELECT 100 / T2.ListPrice FROM Product AS T1 INNER JOIN ProductListPriceHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Cable Lock'
Database: works_cycles
Question: What is the scrap reason for work order "57788"?
SQL: SELECT T2.Name FROM WorkOrder AS T1 INNER JOIN ScrapReason AS T2 ON T1.ScrapReasonID = T2.ScrapReasonID WHERE T1.WorkOrderID = 57788
Database: works_cycles
Question: What is the cost for the sports?
Evidence: cost refers to StandardCost;
SQL: SELECT T2.StandardCost FROM Product AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE '%Sport%'
Database: works_cycles
Question: How many products with the id "476" are stored in Metal Storage?
Evidence: Metal Storage is name of location
SQL: SELECT T2.Quantity FROM Location AS T1 INNER JOIN ProductInventory AS T2 ON T1.LocationID = T2.LocationID WHERE T2.ProductID = 476 AND T1.Name = 'Metal Storage'
Database: works_cycles
Question: List all the products with lower than average cost.
Evidence: cost refers to StandardCost; lower than average cost = StandardCost<(AVG(StandardCost));
SQL: SELECT DISTINCT T2.ProductID FROM ProductCostHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.StandardCost < ( SELECT SUM(StandardCost) / COUNT(ProductID) FROM Product )
Database: works_cycles
Question: What is the the percentage of profit for the product "858"?
Evidence: percentage of profit = DIVIDE(SUBTRACT(ListPrice, StandardCost), (StandardCost)) as percentage;
SQL: SELECT (T1.ListPrice - T2.StandardCost) * 100 / T2.StandardCost FROM ProductListPriceHistory AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 858
Database: works_cycles
Question: How many products with a thumpnail photo?
Evidence: products with a thumbnail photo refers to ProductPhotoID ! = 1 ;
SQL: SELECT COUNT(ProductID) FROM ProductProductPhoto WHERE ProductPhotoID != 1
Database: works_cycles
Question: How many days did it take to end the work order "425"?
Evidence: days to end a work order = SUBTRACT(ActualEndDate, ActualStartDate);
SQL: SELECT 365 * (STRFTIME('%Y', ActualEndDate) - STRFTIME('%Y', ActualStartDate)) + 30 * (STRFTIME('%m', ActualEndDate) - STRFTIME('%m', ActualStartDate)) + STRFTIME('%d', ActualEndDate) - STRFTIME('%d', ActualStartDate) FROM WorkOrderRouting WHERE WorkOrderID = 425
Database: works_cycles
Question: Which product has the highest price in 2012?
Evidence: price refers to ListPrice; highest price refers to MAX(ListPrice);
SQL: SELECT ProductID FROM ProductListPriceHistory WHERE StartDate LIKE '2012%' ORDER BY ListPrice DESC LIMIT 1
Database: works_cycles
Question: What is the cost for the product "847"?
Evidence: cost refers to StandardCost;
SQL: SELECT StandardCost FROM ProductCostHistory WHERE ProductID = 847
Database: works_cycles
Question: What is the organization level for Human Resources Manager?
Evidence: Human Resources Manager is a job title
SQL: SELECT OrganizationLevel FROM Employee WHERE JobTitle = 'Human Resources Manager'
Database: works_cycles
Question: How many of the work orders didn’t meet the due date?
Evidence: workers who did not meet the due date refers to EndDate>DueDate;
SQL: SELECT COUNT(WorkOrderID) FROM WorkOrder WHERE EndDate > DueDate
Database: works_cycles
Question: What is the cost and the product number of product with the id "888"?
Evidence: cost refers to StandardCost;
SQL: SELECT T2.StandardCost, T2.ProductNumber FROM ProductCostHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 888
Database: works_cycles
Question: How many products using "roadster_black_small.gif" as the thumbnail photo?
Evidence: products using roadster_black_small.gif as the thumbnail photo refers to ThumbnailPhotoFileName = 'roadster_black_small.gif';
SQL: SELECT COUNT(DISTINCT T2.ProductID) FROM ProductPhoto AS T1 INNER JOIN ProductProductPhoto AS T2 ON T1.ProductPhotoID = T2.ProductPhotoID WHERE T1.LargePhotoFileName = 'roadster_black_large.gif'
Database: works_cycles
Question: List the locations ids, compartments and containers for the Lock Ring
Evidence: compartment refers to Shelf; container refers to Bin; Lock Ring is a name of product
SQL: SELECT T2.LocationID, T2.Shelf, T2.Bin FROM Product AS T1 INNER JOIN ProductInventory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE 'Lock Ring'
Database: works_cycles
Question: What category do Road Frames fall into?
Evidence: Road Frames is a name of product subcategory
SQL: SELECT T2.Name FROM ProductSubcategory AS T1 INNER JOIN ProductCategory AS T2 ON T1.ProductCategoryID = T2.ProductCategoryID WHERE T1.Name = 'Road Frames'
Database: works_cycles
Question: List all the scraped work orders for handling damage reason.
Evidence: handling damage is descrription of manufacturing failure which refers to ScrapReason.Name
SQL: SELECT T2.WorkOrderID FROM ScrapReason AS T1 INNER JOIN WorkOrder AS T2 ON T1.ScrapReasonID = T2.ScrapReasonID WHERE T1.Name = 'Handling damage'
Database: works_cycles
Question: What is the profit for the product "792"?
Evidence: profit = SUBTRACT(ListPrice, StandardCost);
SQL: SELECT T1.ListPrice - T2.StandardCost FROM ProductListPriceHistory AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 792
Database: works_cycles
Question: Who owns the email address "regina7@adventure-works.com"?
SQL: SELECT T2.FirstName, T2.LastName FROM EmailAddress AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.EmailAddress = 'regina7@adventure-works.com'
Database: works_cycles
Question: Where are the locations where the product "810" is stored?
SQL: SELECT T2.Name FROM ProductInventory AS T1 INNER JOIN Location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.ProductID = 810
Database: works_cycles
Question: What is the name of the product the work order "2540" was making?
SQL: SELECT T2.Name FROM WorkOrder AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.WorkOrderID = 2540
Database: works_cycles
Question: What is the price for the AWC Logo Cap?
Evidence: price refers to ListPrice; price of 3 products = MULTIPLY(ListPrice, 3); Lock Washer 6 is a name of a product;
SQL: SELECT T2.ListPrice FROM Product AS T1 INNER JOIN ProductListPriceHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'AWC Logo Cap'
Database: works_cycles
Question: List all the work orders that is related to the Down Tube.
Evidence: Down Tube is a name of a product;
SQL: SELECT T2.WorkOrderID FROM Product AS T1 INNER JOIN WorkOrder AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Down Tube'
Database: works_cycles
Question: What is the the average percentage of profit for the all the product?
Evidence: average profit percentage = DIVIDE(SUBTRACT(ListPrice, StandardCost)), (StandardCost)));
SQL: SELECT AVG((T1.ListPrice - T2.StandardCost) * 100 / T2.StandardCost) FROM ProductListPriceHistory AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID
Database: works_cycles
Question: What proportion of work order is in Subassembly?
Evidence: proportion = DIVIDE(SUM(Name = 'Subassembly'). (COUNT(WorkOrderID)));
SQL: SELECT 100.0 * SUM(CASE WHEN T1.Name = 'Subassembly' THEN 1 ELSE 0 END) / COUNT(T2.WorkOrderID) FROM Location AS T1 INNER JOIN WorkOrderRouting AS T2 ON T1.LocationID = T2.LocationID
Database: image_and_language
Question: How many object samples are there in image no.1?
Evidence: object samples refers to OBJ_SAMPLE_ID; image no.1 refers to IMG_ID = 1
SQL: SELECT COUNT(OBJ_SAMPLE_ID) FROM IMG_OBJ WHERE IMG_ID = 1
Database: image_and_language
Question: How many images have over 20 object samples?
Evidence: over 20 object samples refers to COUNT(OBJ_SAMPLE_ID) > 20
SQL: SELECT COUNT(T1.IMG_ID) FROM ( SELECT IMG_ID FROM IMG_OBJ GROUP BY IMG_ID HAVING COUNT(OBJ_SAMPLE_ID) > 20 ) T1
Database: image_and_language
Question: What is the ID of the image with the most number of object samples?
Evidence: ID of the image refers to IMG_ID; most number of object samples refers to max(count(OBJ_SAMPLE_ID))
SQL: SELECT IMG_ID FROM IMG_OBJ GROUP BY IMG_ID ORDER BY COUNT(OBJ_SAMPLE_ID) DESC LIMIT 1
Database: image_and_language
Question: Please list the IDs of the object samples in class no. 297 in image no.1.
Evidence: IDs of the object samples refers to OBJ_SAMPLE_ID; class no. 297 in image no.1 refers to IMG_ID = 1 and OBJ_CLASS_ID = 297
SQL: SELECT OBJ_SAMPLE_ID FROM IMG_OBJ WHERE IMG_ID = 1 AND OBJ_CLASS_ID = 297
Database: image_and_language
Question: How many self-relations are there between the object samples in image no.5?
Evidence: self-relations refers to OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID; image no.5 refers to IMG_ID = 5
SQL: SELECT SUM(CASE WHEN IMG_ID = 5 THEN 1 ELSE 0 END) FROM IMG_REL WHERE OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID
Database: image_and_language
Question: What is the bounding box of the object sample in image no.5 that has a self-relation?
Evidence: bounding box of the object sample refers to (x, y, W, H); image no.5 refers to IMG_ID = 5; has a self-relation refers to OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID
SQL: SELECT T2.X, T2.Y, T2.W, T2.H FROM IMG_REL AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.IMG_ID = T2.IMG_ID WHERE T1.IMG_ID = 5 AND T1.OBJ1_SAMPLE_ID = T1.OBJ2_SAMPLE_ID
Database: image_and_language
Question: How many object samples in image no.1 are in the class of "man"?
Evidence: object samples refers to OBJ_CLASS_ID; image no.1 refers to IMG_ID = 1; in the class of "man" refers to OBJ_CLASS = 'man'
SQL: SELECT SUM(CASE WHEN T1.OBJ_CLASS = 'man' THEN 1 ELSE 0 END) FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 1
Database: image_and_language
Question: How many images have at least one object sample in the class of "man"?
Evidence: have at least one object sample in the class of "man" refers to count(IMG_ID where OBJ_CLASS = 'man') > = 1
SQL: SELECT COUNT(T.IMG_ID) FROM ( SELECT T2.IMG_ID FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.OBJ_CLASS = 'man' GROUP BY T2.IMG_ID ) T
Database: image_and_language
Question: Please list the classes of all the object samples in image no.1.
Evidence: classes of all the object samples refers to OBJ_CLASS; image no.1 refers to IMG_ID = 1
SQL: SELECT T1.OBJ_CLASS FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 GROUP BY T1.OBJ_CLASS
Database: image_and_language
Question: What is the relation between object sample no.8 and object sample no.4 in image no.1?
Evidence: relation refers to PRED_CLASS; object sample no.8 and object sample no.4 refers to OBJ1_SAMPLE_ID = 8 AND OBJ2_SAMPLE_ID = 4; image no.1 refers to IMG_ID = 1
SQL: SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 1 AND T2.OBJ1_SAMPLE_ID = 8 AND T2.OBJ2_SAMPLE_ID = 4
Database: image_and_language
Question: How many pairs of object samples in image no.1 have the relation of "parked on"?
Evidence: pairs of object samples refers to OBJ1_SAMPLE_ID and OBJ2_SAMPLE_ID; image no.1 refers to IMG_ID = 1; relation of "parked on" refers to PRED_CLASS = 'parked on'
SQL: SELECT SUM(CASE WHEN T1.PRED_CLASS = 'parked on' THEN 1 ELSE 0 END) FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 1 AND T2.OBJ1_SAMPLE_ID != OBJ2_SAMPLE_ID
Database: image_and_language
Question: Please list all the predicted relation classes of object sample no.14 in image no.1.
Evidence: predicted relation classes refers to PRED_CLASS; object sample no.14 in image no.1 refers to OBJ1_SAMPLE_ID = 14 AND OBJ2_SAMPLE_ID = 14 and IMG_ID = 1
SQL: SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.OBJ1_SAMPLE_ID = 14 AND T2.OBJ2_SAMPLE_ID = 14
Database: image_and_language
Question: How many images have at least one pair of object samples with the relation "parked on"?
Evidence: How many images have at least one pair of object samples with the relation "parked on" refers to count(IMG_ID) where OBJ1_SAMPLE_ID ! = OBJ2_SAMPLE_ID and PRED_CLASS = 'parked on'
SQL: SELECT SUM(CASE WHEN T1.PRED_CLASS = 'parked on' THEN 1 ELSE 0 END) FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.OBJ1_SAMPLE_ID != T2.OBJ2_SAMPLE_ID
Database: image_and_language
Question: Please list the IDs of all the images with more than 2 pairs of object samples with the relation "parked on".
Evidence: IDs of all the images refers to IMG_ID; relation "parked on" refers to PRED_CLASS = 'parked on'; more than 2 pairs refers to count(IMG_ID) where OBJ1_SAMPLE_ID ! = OBJ2_SAMPLE_ID
SQL: SELECT T2.IMG_ID FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.PRED_CLASS = 'parked on' AND T2.OBJ1_SAMPLE_ID != T2.OBJ2_SAMPLE_ID GROUP BY T2.IMG_ID HAVING COUNT(T2.IMG_ID) > 2
Database: image_and_language
Question: To which predicted relation class does the self-relation of the object sample in image no.5 belong?
Evidence: predicted relation class refers to PRED_CLASS; self-relations refers to OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID; image no.5 refers to IMG_ID = 5
SQL: SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 5 AND T2.OBJ1_SAMPLE_ID = T2.OBJ2_SAMPLE_ID
Database: image_and_language
Question: What are the bounding boxes of the object samples with a predicted relation class of "by" in image no.1?
Evidence: bounding boxes of the object samples refers to (x, y, W, H); predicted relation class of "by" refers to PRED_CLASS = 'by'; image no.1 refers to IMG_ID = 1
SQL: SELECT T3.X, T3.Y, T3.W, T3.H FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.OBJ1_SAMPLE_ID = T3.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 AND T1.PRED_CLASS = 'by'
Database: image_and_language
Question: What is the average difference in the y coordinate of 2 object samples with the relation "parked on" in image no.1?
Evidence: relation "parked on" refers to PRED_CLASS = 'parked on'; image no.1 refers to IMG_ID = 1; average difference in the y coordinate = divide(sum(Y), count(PRED_CLASS)) where OBJ1_SAMPLE_ID ! = OBJ2_SAMPLE_ID
SQL: SELECT CAST(SUM(T3.Y) AS REAL) / COUNT(CASE WHEN T1.PRED_CLASS = 'parked on' THEN 1 ELSE NULL END) FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.OBJ1_SAMPLE_ID = T3.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 AND T2.OBJ1_SAMPLE_ID != T2.OBJ2_SAMPLE_ID
Database: image_and_language
Question: What is the percentage of the object samples in the class of "man" in image no.1?
Evidence: object samples refers to OBJ_SAMPLE_ID; class of "man" refers to OBJ_CLASS = 'man'; image no.1 refers to IMG_ID = 1; percentage = divide(count(OBJ_SAMPLE_ID)when OBJ_CLASS = 'man', count(OBJ_SAMPLE_ID)) as percentage
SQL: SELECT CAST(COUNT(CASE WHEN T1.OBJ_CLASS = 'man' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.OBJ_CLASS_ID) FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 1
Database: image_and_language
Question: State the total number of the attribute classes.
Evidence: attribute classes refers to ATT_CLASS
SQL: SELECT COUNT(ATT_CLASS_ID) FROM ATT_CLASSES
Database: image_and_language
Question: How many object classes are there in the database?
Evidence: object classes refers to OBJ_CLASS
SQL: SELECT COUNT(OBJ_CLASS_ID) FROM OBJ_CLASSES
Database: image_and_language
Question: Provide the number of predicted classes.
Evidence: predicted classes refers to PRED_CLASS
SQL: SELECT COUNT(PRED_CLASS_ID) FROM PRED_CLASSES
Database: image_and_language
Question: Give the bounding box of the kite in image no.2324765.
Evidence: bounding box refers to (x, y, W, H); kite refers to OBJ_CLASS = 'kite'; image no.2324765 refers to IMG_ID = 2324765
SQL: SELECT T2.X, T2.Y, T2.W, T2.H FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 2324765 AND T1.OBJ_CLASS = 'kite'
Database: image_and_language
Question: How many white objects are there in image no.2347915?
Evidence: white objects refers to ATT_CLASS = 'white'; image no.2347915 refers to IMG_ID = 2347915
SQL: SELECT SUM(CASE WHEN T2.ATT_CLASS = 'white' THEN 1 ELSE 0 END) FROM IMG_OBJ_ATT AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 2347915
Database: image_and_language
Question: Give the number of samples in image no.2377985 whose attribute is electrical.
Evidence: number of samples refers to OBJ_SAMPLE_ID; image no.2377985 refers to IMG_ID = 2377985; attribute is electrical refers to ATT_CLASS = 'electrical'
SQL: SELECT SUM(CASE WHEN T2.ATT_CLASS = 'white' THEN 1 ELSE 0 END) FROM IMG_OBJ_ATT AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 2347915
Database: image_and_language
Question: What is the relationship between object sample no.12 and no.8 of image no.2345511?
Evidence: relationship refers to PRED_CLASS; object sample no.12 and no.8 of image no.2345511 refers to IMG_ID = 2345511 AND OBJ1_SAMPLE_ID = 12 AND OBJ2_SAMPLE_ID = 8
SQL: SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 2345511 AND T2.OBJ1_SAMPLE_ID = 12 AND T2.OBJ2_SAMPLE_ID = 8
Database: image_and_language
Question: Give the object number of the sample which has the relationship of "lying on" with object sample no.1 from image no.2345524.
Evidence: object number of the sample refers to OBJ1_SAMPLE_ID; object sample no.1 from image no.2345524 refers to OBJ2_SAMPLE_ID = 1 and IMG_ID = 2345524
SQL: SELECT T2.OBJ1_SAMPLE_ID FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 2345524 AND T1.PRED_CLASS = 'lying on' AND T2.OBJ2_SAMPLE_ID = 1
Database: image_and_language
Question: How many samples of food object are there in image no.6?
Evidence: samples of food object refers to OBJ_CLASS = 'food'; image no.6 refers to IMG_ID = 6
SQL: SELECT COUNT(T2.OBJ_SAMPLE_ID) FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 6 AND T1.OBJ_CLASS = 'food'
Database: image_and_language
Question: Give the number of images containing the object sample of "suit".
Evidence: number of images refers to IMG_ID; object sample of "suit" refers to OBJ_CLASS = 'suit'
SQL: SELECT COUNT(T.IMG_ID) FROM ( SELECT T2.IMG_ID FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.OBJ_CLASS = 'suit' GROUP BY T2.IMG_ID ) T
Database: image_and_language
Question: What is the relationship between "feathers" and "onion" in image no.2345528?
Evidence: relationship refers to PRED_CLASS; "feathers" and "onion" in image no.2345528 refers to IMG_ID = 2345528 and OBJ_CLASS = 'feathers' and OBJ_CLASS = 'onion'
SQL: SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.OBJ1_SAMPLE_ID = T3.OBJ_SAMPLE_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE (T4.OBJ_CLASS = 'feathers' OR T4.OBJ_CLASS = 'onion') AND T2.IMG_ID = 2345528 GROUP BY T1.PRED_CLASS
Database: image_and_language
Question: Tell the attribute of the weeds in image no.2377988.
Evidence: attribute of the weeds refers to OBJ_CLASS = 'weeds'; image no.2377988 refers to IMG_ID = 2377988
SQL: SELECT T2.ATT_CLASS FROM IMG_OBJ_att AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T4.OBJ_CLASS = 'weeds' AND T1.IMG_ID = 2377988