query_id
int64 0
7k
| database_id
stringclasses 140
values | table_id
sequencelengths 1
5
| query
stringlengths 16
224
| answer
stringlengths 18
577
| difficulty
stringclasses 4
values |
---|---|---|---|---|---|
6,400 | cre_Docs_and_Epenses | [
"Documents"
] | Show the ids and names of all documents. | SELECT document_id , document_name FROM Documents | medium |
6,401 | cre_Docs_and_Epenses | [
"Documents"
] | What are the ids and names for each of the documents? | SELECT document_id , document_name FROM Documents | medium |
6,402 | cre_Docs_and_Epenses | [
"Documents"
] | Find names and ids of all documents with document type code BK. | SELECT document_name , document_id FROM Documents WHERE document_type_code = "BK" | medium |
6,403 | cre_Docs_and_Epenses | [
"Documents"
] | What are the names and ids of documents that have the type code BK? | SELECT document_name , document_id FROM Documents WHERE document_type_code = "BK" | medium |
6,404 | cre_Docs_and_Epenses | [
"Documents"
] | How many documents are with document type code BK for each product id? | SELECT count(*) , project_id FROM Documents WHERE document_type_code = "BK" GROUP BY project_id | medium |
6,405 | cre_Docs_and_Epenses | [
"Documents"
] | Count the number of documents with the type code BK that correspond to each product id. | SELECT count(*) , project_id FROM Documents WHERE document_type_code = "BK" GROUP BY project_id | medium |
6,406 | cre_Docs_and_Epenses | [
"Documents",
"projects"
] | Show the document name and the document date for all documents on project with details 'Graph Database project'. | SELECT document_name , document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project' | medium |
6,407 | cre_Docs_and_Epenses | [
"Documents",
"projects"
] | What are the names and dates for documents corresponding to project that has the details 'Graph Database project'? | SELECT document_name , document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'Graph Database project' | medium |
6,408 | cre_Docs_and_Epenses | [
"Documents"
] | Show project ids and the number of documents in each project. | SELECT project_id , count(*) FROM Documents GROUP BY project_id | medium |
6,409 | cre_Docs_and_Epenses | [
"Documents"
] | How many documents correspond with each project id? | SELECT project_id , count(*) FROM Documents GROUP BY project_id | medium |
6,410 | cre_Docs_and_Epenses | [
"Documents"
] | What is the id of the project with least number of documents? | SELECT project_id FROM Documents GROUP BY project_id ORDER BY count(*) ASC LIMIT 1 | hard |
6,411 | cre_Docs_and_Epenses | [
"Documents"
] | Return the id of the project that has the fewest corresponding documents. | SELECT project_id FROM Documents GROUP BY project_id ORDER BY count(*) ASC LIMIT 1 | hard |
6,412 | cre_Docs_and_Epenses | [
"Documents"
] | Show the ids for projects with at least 2 documents. | SELECT project_id FROM Documents GROUP BY project_id HAVING count(*) >= 2 | easy |
6,413 | cre_Docs_and_Epenses | [
"Documents"
] | What are project ids of projects that have 2 or more corresponding documents? | SELECT project_id FROM Documents GROUP BY project_id HAVING count(*) >= 2 | easy |
6,414 | cre_Docs_and_Epenses | [
"Documents"
] | List document type codes and the number of documents in each code. | SELECT document_type_code , count(*) FROM Documents GROUP BY document_type_code | medium |
6,415 | cre_Docs_and_Epenses | [
"Documents"
] | How many documents are there of each type? | SELECT document_type_code , count(*) FROM Documents GROUP BY document_type_code | medium |
6,416 | cre_Docs_and_Epenses | [
"Documents"
] | What is the document type code with most number of documents? | SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1 | hard |
6,417 | cre_Docs_and_Epenses | [
"Documents"
] | Return the code of the document type that is most common. | SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1 | hard |
6,418 | cre_Docs_and_Epenses | [
"Documents"
] | Show the document type code with fewer than 3 documents. | SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING count(*) < 3 | easy |
6,419 | cre_Docs_and_Epenses | [
"Documents"
] | What are the codes corresponding to document types for which there are less than 3 documents? | SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING count(*) < 3 | easy |
6,420 | cre_Docs_and_Epenses | [
"Statements",
"Documents"
] | Show the statement detail and the corresponding document name for the statement with detail 'Private Project'. | SELECT T1.statement_details , T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project' | medium |
6,421 | cre_Docs_and_Epenses | [
"Statements",
"Documents"
] | What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents? | SELECT T1.statement_details , T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id = T2.document_id WHERE T1.statement_details = 'Private Project' | medium |
6,422 | cre_Docs_and_Epenses | [
"Ref_document_types"
] | Show all document type codes, document type names, document type descriptions. | SELECT document_type_code , document_type_name , document_type_description FROM Ref_document_types | medium |
6,423 | cre_Docs_and_Epenses | [
"Ref_document_types"
] | What are the codes, names, and descriptions of the different document types? | SELECT document_type_code , document_type_name , document_type_description FROM Ref_document_types | medium |
6,424 | cre_Docs_and_Epenses | [
"Ref_document_types"
] | What is the document type description for document type named Film? | SELECT document_type_description FROM Ref_document_types WHERE document_type_name = "Film" | easy |
6,425 | cre_Docs_and_Epenses | [
"Ref_document_types"
] | Return the description of the document type name 'Film'. | SELECT document_type_description FROM Ref_document_types WHERE document_type_name = "Film" | easy |
6,426 | cre_Docs_and_Epenses | [
"Documents",
"Ref_document_types"
] | What is the document type name and the document type description and creation date for all the documents? | SELECT T1.document_type_name , T1.document_type_description , T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code = T2.document_type_code | medium |
6,427 | cre_Docs_and_Epenses | [
"Documents",
"Ref_document_types"
] | Return the type name, type description, and date of creation for each document. | SELECT T1.document_type_name , T1.document_type_description , T2.Document_date FROM Ref_document_types AS T1 JOIN Documents AS T2 ON T1.document_type_code = T2.document_type_code | medium |
6,428 | cre_Docs_and_Epenses | [
"Projects"
] | Show the number of projects. | SELECT count(*) FROM Projects | easy |
6,429 | cre_Docs_and_Epenses | [
"Projects"
] | How many projects are there? | SELECT count(*) FROM Projects | easy |
6,430 | cre_Docs_and_Epenses | [
"Projects"
] | List ids and details for all projects. | SELECT project_id , project_details FROM Projects | medium |
6,431 | cre_Docs_and_Epenses | [
"Projects"
] | What are the ids and details for each project? | SELECT project_id , project_details FROM Projects | medium |
6,432 | cre_Docs_and_Epenses | [
"Documents",
"Projects"
] | What is the project id and detail for the project with at least two documents? | SELECT T1.project_id , T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id HAVING count(*) > 2 | medium |
6,433 | cre_Docs_and_Epenses | [
"Documents",
"Projects"
] | Return the ids and details corresponding to projects for which there are more than two documents. | SELECT T1.project_id , T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id HAVING count(*) > 2 | medium |
6,434 | cre_Docs_and_Epenses | [
"Documents",
"Projects"
] | What is the project detail for the project with document "King Book"? | SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id WHERE T2.document_name = "King Book" | medium |
6,435 | cre_Docs_and_Epenses | [
"Documents",
"Projects"
] | Give the details of the project with the document name 'King Book'. | SELECT T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id WHERE T2.document_name = "King Book" | medium |
6,436 | cre_Docs_and_Epenses | [
"Ref_budget_codes"
] | How many budget types do we have? | SELECT count(*) FROM Ref_budget_codes | easy |
6,437 | cre_Docs_and_Epenses | [
"Ref_budget_codes"
] | Count the number of budget codes. | SELECT count(*) FROM Ref_budget_codes | easy |
6,438 | cre_Docs_and_Epenses | [
"Ref_budget_codes"
] | List all budget type codes and descriptions. | SELECT budget_type_code , budget_type_description FROM Ref_budget_codes | medium |
6,439 | cre_Docs_and_Epenses | [
"Ref_budget_codes"
] | What are the type codes and descriptions of each budget type? | SELECT budget_type_code , budget_type_description FROM Ref_budget_codes | medium |
6,440 | cre_Docs_and_Epenses | [
"Ref_budget_codes"
] | What is the description for the budget type with code ORG? | SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = "ORG" | easy |
6,441 | cre_Docs_and_Epenses | [
"Ref_budget_codes"
] | Return the description of the budget type that has the code ORG. | SELECT budget_type_description FROM Ref_budget_codes WHERE budget_type_code = "ORG" | easy |
6,442 | cre_Docs_and_Epenses | [
"Documents_with_expenses"
] | How many documents have expenses? | SELECT count(*) FROM Documents_with_expenses | easy |
6,443 | cre_Docs_and_Epenses | [
"Documents_with_expenses"
] | Count the number of documents with expenses. | SELECT count(*) FROM Documents_with_expenses | easy |
6,444 | cre_Docs_and_Epenses | [
"Documents_with_expenses"
] | What are the document ids for the budget type code 'SF'? | SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF' | easy |
6,445 | cre_Docs_and_Epenses | [
"Documents_with_expenses"
] | Give the ids of documents with expenses that have the budget code 'SF'. | SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF' | easy |
6,446 | cre_Docs_and_Epenses | [
"Documents_with_expenses",
"Ref_budget_codes"
] | Show the budget type code and description and the corresponding document id. | SELECT T2.budget_type_code , T2.budget_type_description , T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code | medium |
6,447 | cre_Docs_and_Epenses | [
"Documents_with_expenses",
"Ref_budget_codes"
] | Return the budget type codes, budget type descriptions and document ids for documents with expenses. | SELECT T2.budget_type_code , T2.budget_type_description , T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code | medium |
6,448 | cre_Docs_and_Epenses | [
"Documents_with_expenses",
"Ref_Budget_Codes"
] | Show ids for all documents with budget types described as 'Government'. | SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code = T2.Budget_Type_code WHERE T2.budget_type_Description = "Government" | medium |
6,449 | cre_Docs_and_Epenses | [
"Documents_with_expenses",
"Ref_Budget_Codes"
] | Give the ids for documents that have the budget description 'Government'. | SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code = T2.Budget_Type_code WHERE T2.budget_type_Description = "Government" | medium |
6,450 | cre_Docs_and_Epenses | [
"Documents_with_expenses"
] | Show budget type codes and the number of documents in each budget type. | SELECT budget_type_code , count(*) FROM Documents_with_expenses GROUP BY budget_type_code | medium |
6,451 | cre_Docs_and_Epenses | [
"Documents_with_expenses"
] | What are the different budget type codes, and how many documents are there for each? | SELECT budget_type_code , count(*) FROM Documents_with_expenses GROUP BY budget_type_code | medium |
6,452 | cre_Docs_and_Epenses | [
"Documents_with_expenses"
] | What is the budget type code with most number of documents. | SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY count(*) DESC LIMIT 1 | hard |
6,453 | cre_Docs_and_Epenses | [
"Documents_with_expenses"
] | Give the budget type code that is most common among documents with expenses. | SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY count(*) DESC LIMIT 1 | hard |
6,454 | cre_Docs_and_Epenses | [
"Documents_with_expenses",
"Documents"
] | What are the ids of documents which don't have expense budgets? | SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses | hard |
6,455 | cre_Docs_and_Epenses | [
"Documents_with_expenses",
"Documents"
] | Return the ids of documents that do not have expenses. | SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses | hard |
6,456 | cre_Docs_and_Epenses | [
"Documents_with_expenses",
"Documents"
] | Show ids for all documents in type CV without expense budgets. | SELECT document_id FROM Documents WHERE document_type_code = "CV" EXCEPT SELECT document_id FROM Documents_with_expenses | hard |
6,457 | cre_Docs_and_Epenses | [
"Documents_with_expenses",
"Documents"
] | What are the ids of documents with the type code CV that do not have expenses. | SELECT document_id FROM Documents WHERE document_type_code = "CV" EXCEPT SELECT document_id FROM Documents_with_expenses | hard |
6,458 | cre_Docs_and_Epenses | [
"Documents_with_expenses",
"Documents"
] | What are the ids of documents with letter 's' in the name with any expense budgets. | SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id = T2.document_id WHERE T1.document_name LIKE '%s%' | hard |
6,459 | cre_Docs_and_Epenses | [
"Documents_with_expenses",
"Documents"
] | Give the ids of documents that have expenses and contain the letter s in their names. | SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id = T2.document_id WHERE T1.document_name LIKE '%s%' | hard |
6,460 | cre_Docs_and_Epenses | [
"Documents_with_expenses",
"Documents"
] | How many documents do not have any expense? | SELECT count(*) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses ) | extra |
6,461 | cre_Docs_and_Epenses | [
"Documents_with_expenses",
"Documents"
] | Count the number of documents that do not have expenses. | SELECT count(*) FROM Documents WHERE document_id NOT IN ( SELECT document_id FROM Documents_with_expenses ) | extra |
6,462 | cre_Docs_and_Epenses | [
"Documents",
"Documents_with_Expenses"
] | What are the dates for the documents with both 'GV' type and 'SF' type expenses? | SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF' | extra |
6,463 | cre_Docs_and_Epenses | [
"Documents",
"Documents_with_Expenses"
] | Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'. | SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF' | extra |
6,464 | cre_Docs_and_Epenses | [
"Accounts"
] | What are the account details with the largest value or with value having char '5' in it? | SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE "%5%" | hard |
6,465 | cre_Docs_and_Epenses | [
"Accounts"
] | Return the account details with the greatest value, as well as those that include the character 5. | SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE "%5%" | hard |
6,466 | scientist_1 | [
"scientists"
] | Find the total number of scientists. | SELECT count(*) FROM scientists | easy |
6,467 | scientist_1 | [
"scientists"
] | How many scientists are there? | SELECT count(*) FROM scientists | easy |
6,468 | scientist_1 | [
"projects"
] | Find the total hours of all projects. | SELECT sum(hours) FROM projects | easy |
6,469 | scientist_1 | [
"projects"
] | What is the total number of hours for all projects? | SELECT sum(hours) FROM projects | easy |
6,470 | scientist_1 | [
"assignedto"
] | How many different scientists are assigned to any project? | SELECT count(DISTINCT scientist) FROM assignedto | easy |
6,471 | scientist_1 | [
"assignedto"
] | Count the number of different scientists assigned to any project. | SELECT count(DISTINCT scientist) FROM assignedto | easy |
6,472 | scientist_1 | [
"projects"
] | Find the number of distinct projects. | SELECT count(DISTINCT name) FROM projects | easy |
6,473 | scientist_1 | [
"projects"
] | How many different projects are there? | SELECT count(DISTINCT name) FROM projects | easy |
6,474 | scientist_1 | [
"projects"
] | Find the average hours of all projects. | SELECT avg(hours) FROM projects | easy |
6,475 | scientist_1 | [
"projects"
] | What is the average hours across all projects? | SELECT avg(hours) FROM projects | easy |
6,476 | scientist_1 | [
"projects"
] | Find the name of project that continues for the longest time. | SELECT name FROM projects ORDER BY hours DESC LIMIT 1 | medium |
6,477 | scientist_1 | [
"projects"
] | What is the name of the project with the most hours? | SELECT name FROM projects ORDER BY hours DESC LIMIT 1 | medium |
6,478 | scientist_1 | [
"projects"
] | List the name of all projects that are operated longer than the average working hours of all projects. | SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects) | hard |
6,479 | scientist_1 | [
"projects"
] | What are the names of projects that have taken longer than the average number of hours for all projects? | SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects) | hard |
6,480 | scientist_1 | [
"assignedto",
"projects"
] | Find the name and hours of project that has the most number of scientists. | SELECT T1.name , T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1 | extra |
6,481 | scientist_1 | [
"assignedto",
"projects"
] | What is the name and hours for the project which has the most scientists assigned to it? | SELECT T1.name , T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1 | extra |
6,482 | scientist_1 | [
"assignedto",
"scientists",
"projects"
] | Find the name of the project for which a scientist whose name contains ‘Smith’ is assigned to. | SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%' | extra |
6,483 | scientist_1 | [
"assignedto",
"scientists",
"projects"
] | What is the name of the project that has a scientist assigned to it whose name contains 'Smith'? | SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name LIKE '%Smith%' | extra |
6,484 | scientist_1 | [
"assignedto",
"scientists",
"projects"
] | Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to. | SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith' | extra |
6,485 | scientist_1 | [
"assignedto",
"scientists",
"projects"
] | What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to? | SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith' | extra |
6,486 | scientist_1 | [
"projects"
] | Find the name of projects that require between 100 and 300 hours of work. | SELECT name FROM projects WHERE hours BETWEEN 100 AND 300 | easy |
6,487 | scientist_1 | [
"projects"
] | What are the names of projects that require between 100 and 300 hours? | SELECT name FROM projects WHERE hours BETWEEN 100 AND 300 | easy |
6,488 | scientist_1 | [
"assignedto",
"scientists",
"projects"
] | Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'. | SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax' | extra |
6,489 | scientist_1 | [
"assignedto",
"scientists",
"projects"
] | What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'? | SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.name = 'A Puzzling Parallax' | extra |
6,490 | scientist_1 | [
"scientists"
] | List the names of all scientists sorted in alphabetical order. | SELECT name FROM scientists ORDER BY name | easy |
6,491 | scientist_1 | [
"scientists"
] | What are the names of all the scientists in alphabetical order? | SELECT name FROM scientists ORDER BY name | easy |
6,492 | scientist_1 | [
"assignedto",
"projects"
] | Find the number of scientists involved for each project name. | SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name | medium |
6,493 | scientist_1 | [
"assignedto",
"projects"
] | What are the naems of all the projects, and how many scientists were assigned to each of them? | SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project GROUP BY T1.name | medium |
6,494 | scientist_1 | [
"assignedto",
"projects"
] | Find the number of scientists involved for the projects that require more than 300 hours. | SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name | hard |
6,495 | scientist_1 | [
"assignedto",
"projects"
] | What are the names of projects that require more than 300 hours, and how many scientists are assigned to each? | SELECT count(*) , T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code = T2.project WHERE T1.hours > 300 GROUP BY T1.name | hard |
6,496 | scientist_1 | [
"scientists",
"assignedto"
] | Find the number of projects which each scientist is working on and scientist's name. | SELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name | medium |
6,497 | scientist_1 | [
"scientists",
"assignedto"
] | What are the names of the scientists, and how many projects are each of them working on? | SELECT count(*) , T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn = T2.scientist GROUP BY T1.name | medium |
6,498 | scientist_1 | [
"assignedto",
"scientists",
"projects"
] | Find the SSN and name of scientists who are assigned to the project with the longest hours. | SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) | extra |
6,499 | scientist_1 | [
"assignedto",
"scientists",
"projects"
] | What are the SSN and names of scientists working on the project with the most hours? | SELECT T3.ssn , T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT max(hours) FROM projects) | extra |
Subsets and Splits