query_id
int64 0
1.03k
| database_id
stringclasses 20
values | table_id
sequencelengths 1
4
| query
stringlengths 18
174
| answer
stringlengths 20
422
| difficulty
stringclasses 4
values |
---|---|---|---|---|---|
300 | cre_Doc_Template_Mgt | [
"Documents"
] | What are the ids, names, and descriptions for all documents? | SELECT document_id , document_name , document_description FROM Documents | medium |
301 | cre_Doc_Template_Mgt | [
"Documents"
] | What is the document name and template id for document with description with the letter 'w' in it? | SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE "%w%" | medium |
302 | cre_Doc_Template_Mgt | [
"Documents"
] | Return the names and template ids for documents that contain the letter w in their description. | SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE "%w%" | medium |
303 | cre_Doc_Template_Mgt | [
"Documents"
] | What is the document id, template id and description for document named "Robbin CV"? | SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = "Robbin CV" | medium |
304 | cre_Doc_Template_Mgt | [
"Documents"
] | Return the document id, template id, and description for the document with the name Robbin CV. | SELECT document_id , template_id , Document_Description FROM Documents WHERE document_name = "Robbin CV" | medium |
305 | cre_Doc_Template_Mgt | [
"Documents"
] | How many different templates do all document use? | SELECT count(DISTINCT template_id) FROM Documents | easy |
306 | cre_Doc_Template_Mgt | [
"Documents"
] | Count the number of different templates used for documents. | SELECT count(DISTINCT template_id) FROM Documents | easy |
307 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | How many documents are using the template with type code 'PPT'? | SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT' | medium |
308 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | Count the number of documents that use the PPT template type. | SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT' | medium |
309 | cre_Doc_Template_Mgt | [
"Documents"
] | Show all template ids and number of documents using each template. | SELECT template_id , count(*) FROM Documents GROUP BY template_id | medium |
310 | cre_Doc_Template_Mgt | [
"Documents"
] | What are all different template ids used for documents, and how many times were each of them used? | SELECT template_id , count(*) FROM Documents GROUP BY template_id | medium |
311 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | What is the id and type code for the template used by the most documents? | SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1 | extra |
312 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | Return the id and type code of the template that is used for the greatest number of documents. | SELECT T1.template_id , T2.Template_Type_Code FROM Documents AS T1 JOIN Templates AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_id ORDER BY count(*) DESC LIMIT 1 | extra |
313 | cre_Doc_Template_Mgt | [
"Documents"
] | Show ids for all templates that are used by more than one document. | SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1 | easy |
314 | cre_Doc_Template_Mgt | [
"Documents"
] | What are the template ids of any templates used in more than a single document? | SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1 | easy |
315 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | Show ids for all templates not used by any document. | SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents | hard |
316 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | What are the ids for templates that are not used in any documents? | SELECT template_id FROM Templates EXCEPT SELECT template_id FROM Documents | hard |
317 | cre_Doc_Template_Mgt | [
"Templates"
] | How many templates do we have? | SELECT count(*) FROM Templates | easy |
318 | cre_Doc_Template_Mgt | [
"Templates"
] | Count the number of templates. | SELECT count(*) FROM Templates | easy |
319 | cre_Doc_Template_Mgt | [
"Templates"
] | Show template ids, version numbers, and template type codes for all templates. | SELECT template_id , version_number , template_type_code FROM Templates | medium |
320 | cre_Doc_Template_Mgt | [
"Templates"
] | What are the ids, version numbers, and type codes for each template? | SELECT template_id , version_number , template_type_code FROM Templates | medium |
321 | cre_Doc_Template_Mgt | [
"Templates"
] | Show all distinct template type codes for all templates. | SELECT DISTINCT template_type_code FROM Templates | easy |
322 | cre_Doc_Template_Mgt | [
"Templates"
] | What are the different template type codes? | SELECT DISTINCT template_type_code FROM Templates | easy |
323 | cre_Doc_Template_Mgt | [
"Templates"
] | What are the ids of templates with template type code PP or PPT? | SELECT template_id FROM Templates WHERE template_type_code = "PP" OR template_type_code = "PPT" | medium |
324 | cre_Doc_Template_Mgt | [
"Templates"
] | Return the ids of templates that have the code PP or PPT. | SELECT template_id FROM Templates WHERE template_type_code = "PP" OR template_type_code = "PPT" | medium |
325 | cre_Doc_Template_Mgt | [
"Templates"
] | How many templates have template type code CV? | SELECT count(*) FROM Templates WHERE template_type_code = "CV" | easy |
326 | cre_Doc_Template_Mgt | [
"Templates"
] | Count the number of templates of the type CV. | SELECT count(*) FROM Templates WHERE template_type_code = "CV" | easy |
327 | cre_Doc_Template_Mgt | [
"Templates"
] | What is the version number and template type code for the template with version number later than 5? | SELECT version_number , template_type_code FROM Templates WHERE version_number > 5 | medium |
328 | cre_Doc_Template_Mgt | [
"Templates"
] | Return the version numbers and template type codes of templates with a version number greater than 5. | SELECT version_number , template_type_code FROM Templates WHERE version_number > 5 | medium |
329 | cre_Doc_Template_Mgt | [
"Templates"
] | Show all template type codes and number of templates for each. | SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code | medium |
330 | cre_Doc_Template_Mgt | [
"Templates"
] | What are the different template type codes, and how many templates correspond to each? | SELECT template_type_code , count(*) FROM Templates GROUP BY template_type_code | medium |
331 | cre_Doc_Template_Mgt | [
"Templates"
] | Which template type code has most number of templates? | SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1 | hard |
332 | cre_Doc_Template_Mgt | [
"Templates"
] | Return the type code of the template type that the most templates belong to. | SELECT template_type_code FROM Templates GROUP BY template_type_code ORDER BY count(*) DESC LIMIT 1 | hard |
333 | cre_Doc_Template_Mgt | [
"Templates"
] | Show all template type codes with less than three templates. | SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3 | easy |
334 | cre_Doc_Template_Mgt | [
"Templates"
] | What are the codes of template types that have fewer than 3 templates? | SELECT template_type_code FROM Templates GROUP BY template_type_code HAVING count(*) < 3 | easy |
335 | cre_Doc_Template_Mgt | [
"Templates"
] | What the smallest version number and its template type code? | SELECT min(Version_Number) , template_type_code FROM Templates | medium |
336 | cre_Doc_Template_Mgt | [
"Templates"
] | Return the lowest version number, along with its corresponding template type code. | SELECT min(Version_Number) , template_type_code FROM Templates | medium |
337 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | What is the template type code of the template used by document with the name "Data base"? | SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = "Data base" | medium |
338 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | Return the template type code of the template that is used by a document named Data base. | SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T2.document_name = "Data base" | medium |
339 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | Show all document names using templates with template type code BK. | SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = "BK" | medium |
340 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | What are the names of documents that use templates with the code BK? | SELECT T2.document_name FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id WHERE T1.template_type_code = "BK" | medium |
341 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | Show all template type codes and the number of documents using each type. | SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code | medium |
342 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | What are the different template type codes, and how many documents use each type? | SELECT T1.template_type_code , count(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code | medium |
343 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | Which template type code is used by most number of documents? | SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1 | extra |
344 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | Return the code of the template type that is most commonly used in documents. | SELECT T1.template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code ORDER BY count(*) DESC LIMIT 1 | extra |
345 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | Show all template type codes that are not used by any document. | SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id | hard |
346 | cre_Doc_Template_Mgt | [
"Documents",
"Templates"
] | What are the codes of template types that are not used for any document? | SELECT template_type_code FROM Templates EXCEPT SELECT template_type_code FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id | hard |
347 | cre_Doc_Template_Mgt | [
"Ref_template_types"
] | Show all template type codes and descriptions. | SELECT template_type_code , template_type_description FROM Ref_template_types | medium |
348 | cre_Doc_Template_Mgt | [
"Ref_template_types"
] | What are the type codes and descriptions for all template types? | SELECT template_type_code , template_type_description FROM Ref_template_types | medium |
349 | cre_Doc_Template_Mgt | [
"Ref_template_types"
] | What is the template type descriptions for template type code "AD". | SELECT template_type_description FROM Ref_template_types WHERE template_type_code = "AD" | easy |
350 | cre_Doc_Template_Mgt | [
"Ref_template_types"
] | Return the template type description of the template type with the code AD. | SELECT template_type_description FROM Ref_template_types WHERE template_type_code = "AD" | easy |
351 | cre_Doc_Template_Mgt | [
"Ref_template_types"
] | What is the template type code for template type description "Book". | SELECT template_type_code FROM Ref_template_types WHERE template_type_description = "Book" | easy |
352 | cre_Doc_Template_Mgt | [
"Ref_template_types"
] | Return the type code of the template type with the description "Book". | SELECT template_type_code FROM Ref_template_types WHERE template_type_description = "Book" | easy |
353 | cre_Doc_Template_Mgt | [
"Documents",
"Templates",
"Ref_template_types"
] | What are the distinct template type descriptions for the templates ever used by any document? | SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID | medium |
354 | cre_Doc_Template_Mgt | [
"Documents",
"Templates",
"Ref_template_types"
] | Return the different descriptions for templates that have been used in a document. | SELECT DISTINCT T1.template_type_description FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code JOIN Documents AS T3 ON T2.Template_ID = T3.template_ID | medium |
355 | cre_Doc_Template_Mgt | [
"Templates",
"Ref_template_types"
] | What are the template ids with template type description "Presentation". | SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = "Presentation" | medium |
356 | cre_Doc_Template_Mgt | [
"Templates",
"Ref_template_types"
] | Return the ids corresponding to templates with the description 'Presentation'. | SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = "Presentation" | medium |
357 | cre_Doc_Template_Mgt | [
"Paragraphs"
] | How many paragraphs in total? | SELECT count(*) FROM Paragraphs | easy |
358 | cre_Doc_Template_Mgt | [
"Paragraphs"
] | Count the number of paragraphs. | SELECT count(*) FROM Paragraphs | easy |
359 | cre_Doc_Template_Mgt | [
"Paragraphs",
"Documents"
] | How many paragraphs for the document with name 'Summer Show'? | SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show' | medium |
360 | cre_Doc_Template_Mgt | [
"Paragraphs",
"Documents"
] | Count the number of paragraphs in the document named 'Summer Show'. | SELECT count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_ID = T2.document_ID WHERE T2.document_name = 'Summer Show' | medium |
361 | cre_Doc_Template_Mgt | [
"paragraphs"
] | Show paragraph details for paragraph with text 'Korea ' . | select other_details from paragraphs where paragraph_text like 'korea' | medium |
362 | cre_Doc_Template_Mgt | [
"paragraphs"
] | What are the details for the paragraph that includes the text 'Korea ' ? | select other_details from paragraphs where paragraph_text like 'korea' | medium |
363 | cre_Doc_Template_Mgt | [
"Paragraphs",
"Documents"
] | Show all paragraph ids and texts for the document with name 'Welcome to NY'. | SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY' | medium |
364 | cre_Doc_Template_Mgt | [
"Paragraphs",
"Documents"
] | What are the ids and texts of paragraphs in the document titled 'Welcome to NY'? | SELECT T1.paragraph_id , T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.Document_Name = 'Welcome to NY' | medium |
365 | cre_Doc_Template_Mgt | [
"Paragraphs",
"Documents"
] | Show all paragraph texts for the document "Customer reviews". | SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = "Customer reviews" | medium |
366 | cre_Doc_Template_Mgt | [
"Paragraphs",
"Documents"
] | What are the paragraph texts for the document with the name 'Customer reviews'? | SELECT T1.paragraph_text FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = "Customer reviews" | medium |
367 | cre_Doc_Template_Mgt | [
"Paragraphs"
] | Show all document ids and the number of paragraphs in each document. Order by document id. | SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id | medium |
368 | cre_Doc_Template_Mgt | [
"Paragraphs"
] | Return the different document ids along with the number of paragraphs corresponding to each, ordered by id. | SELECT document_id , count(*) FROM Paragraphs GROUP BY document_id ORDER BY document_id | medium |
369 | cre_Doc_Template_Mgt | [
"Paragraphs",
"Documents"
] | Show all document ids, names and the number of paragraphs in each document. | SELECT T1.document_id , T2.document_name , count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id | medium |
370 | cre_Doc_Template_Mgt | [
"Paragraphs",
"Documents"
] | What are the ids and names of each document, as well as the number of paragraphs in each? | SELECT T1.document_id , T2.document_name , count(*) FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id | medium |
371 | cre_Doc_Template_Mgt | [
"Paragraphs"
] | List all document ids with at least two paragraphs. | SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2 | easy |
372 | cre_Doc_Template_Mgt | [
"Paragraphs"
] | What are the ids of documents that have 2 or more paragraphs? | SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2 | easy |
373 | cre_Doc_Template_Mgt | [
"Paragraphs",
"Documents"
] | What is the document id and name with greatest number of paragraphs? | SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1 | extra |
374 | cre_Doc_Template_Mgt | [
"Paragraphs",
"Documents"
] | Return the id and name of the document with the most paragraphs. | SELECT T1.document_id , T2.document_name FROM Paragraphs AS T1 JOIN Documents AS T2 ON T1.document_id = T2.document_id GROUP BY T1.document_id ORDER BY count(*) DESC LIMIT 1 | extra |
375 | cre_Doc_Template_Mgt | [
"Paragraphs"
] | What is the document id with least number of paragraphs? | SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1 | hard |
376 | cre_Doc_Template_Mgt | [
"Paragraphs"
] | Return the id of the document with the fewest paragraphs. | SELECT document_id FROM Paragraphs GROUP BY document_id ORDER BY count(*) ASC LIMIT 1 | hard |
377 | cre_Doc_Template_Mgt | [
"Paragraphs"
] | What is the document id with 1 to 2 paragraphs? | SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2 | easy |
378 | cre_Doc_Template_Mgt | [
"Paragraphs"
] | Give the ids of documents that have between one and two paragraphs. | SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) BETWEEN 1 AND 2 | easy |
379 | cre_Doc_Template_Mgt | [
"Paragraphs"
] | Show the document id with paragraph text 'Brazil' and 'Ireland'. | SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' | hard |
380 | cre_Doc_Template_Mgt | [
"Paragraphs"
] | What are the ids of documents that contain the paragraph text 'Brazil' and 'Ireland'? | SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Brazil' INTERSECT SELECT document_id FROM Paragraphs WHERE paragraph_text = 'Ireland' | hard |
381 | course_teach | [
"teacher"
] | How many teachers are there? | SELECT count(*) FROM teacher | easy |
382 | course_teach | [
"teacher"
] | What is the total count of teachers? | SELECT count(*) FROM teacher | easy |
383 | course_teach | [
"teacher"
] | List the names of teachers in ascending order of age. | SELECT Name FROM teacher ORDER BY Age ASC | easy |
384 | course_teach | [
"teacher"
] | What are the names of the teachers ordered by ascending age? | SELECT Name FROM teacher ORDER BY Age ASC | easy |
385 | course_teach | [
"teacher"
] | What are the age and hometown of teachers? | SELECT Age , Hometown FROM teacher | medium |
386 | course_teach | [
"teacher"
] | What is the age and hometown of every teacher? | SELECT Age , Hometown FROM teacher | medium |
387 | course_teach | [
"teacher"
] | List the name of teachers whose hometown is not `` Little Lever Urban District '' . | select name from teacher where hometown != "little lever urban district" | easy |
388 | course_teach | [
"teacher"
] | What are the names of the teachers whose hometown is not `` Little Lever Urban District '' ? | select name from teacher where hometown != "little lever urban district" | easy |
389 | course_teach | [
"teacher"
] | Show the name of teachers aged either 32 or 33? | SELECT Name FROM teacher WHERE Age = 32 OR Age = 33 | medium |
390 | course_teach | [
"teacher"
] | What are the names of the teachers who are aged either 32 or 33? | SELECT Name FROM teacher WHERE Age = 32 OR Age = 33 | medium |
391 | course_teach | [
"teacher"
] | What is the hometown of the youngest teacher? | SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1 | medium |
392 | course_teach | [
"teacher"
] | Where is the youngest teacher from? | SELECT Hometown FROM teacher ORDER BY Age ASC LIMIT 1 | medium |
393 | course_teach | [
"teacher"
] | Show different hometown of teachers and the number of teachers from each hometown. | SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown | medium |
394 | course_teach | [
"teacher"
] | For each hometown, how many teachers are there? | SELECT Hometown , COUNT(*) FROM teacher GROUP BY Hometown | medium |
395 | course_teach | [
"teacher"
] | List the most common hometown of teachers. | SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1 | hard |
396 | course_teach | [
"teacher"
] | What is the most commmon hometowns for teachers? | SELECT Hometown FROM teacher GROUP BY Hometown ORDER BY COUNT(*) DESC LIMIT 1 | hard |
397 | course_teach | [
"teacher"
] | Show the hometowns shared by at least two teachers. | SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2 | easy |
398 | course_teach | [
"teacher"
] | What are the towns from which at least two teachers come from? | SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2 | easy |
399 | course_teach | [
"teacher",
"course",
"course_arrange"
] | Show names of teachers and the courses they are arranged to teach. | SELECT T3.Name , T2.Course FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID | medium |