query_id
int64 0
1.03k
| database_id
stringclasses 20
values | table_id
listlengths 1
4
| query
stringlengths 18
174
| answer
stringlengths 20
422
| difficulty
stringclasses 4
values |
---|---|---|---|---|---|
500 |
battle_death
|
[
"ship",
"death"
] |
What is the ship id and name that caused most total injuries?
|
SELECT T2.id , T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1
|
extra
|
501 |
battle_death
|
[
"battle"
] |
What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?
|
SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I'
|
medium
|
502 |
battle_death
|
[
"battle"
] |
How many different results are there for the battles?
|
SELECT count(DISTINCT RESULT) FROM battle
|
easy
|
503 |
battle_death
|
[
"battle",
"ship"
] |
How many battles did not lose any ship with tonnage '225'?
|
SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' );
|
extra
|
504 |
battle_death
|
[
"battle",
"ship"
] |
List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'
|
SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta'
|
extra
|
505 |
battle_death
|
[
"battle",
"ship"
] |
Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.
|
SELECT name , RESULT , bulgarian_commander FROM battle EXCEPT SELECT T1.name , T1.result , T1.bulgarian_commander FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.location = 'English Channel'
|
extra
|
506 |
battle_death
|
[
"death"
] |
What are the notes of the death events which has substring 'East'?
|
SELECT note FROM death WHERE note LIKE '%East%'
|
medium
|
507 |
student_transcripts_tracking
|
[
"addresses"
] |
what are all the addresses including line 1 and line 2?
|
SELECT line_1 , line_2 FROM addresses
|
medium
|
508 |
student_transcripts_tracking
|
[
"addresses"
] |
What is the first and second line for all addresses?
|
SELECT line_1 , line_2 FROM addresses
|
medium
|
509 |
student_transcripts_tracking
|
[
"Courses"
] |
How many courses in total are listed?
|
SELECT count(*) FROM Courses
|
easy
|
510 |
student_transcripts_tracking
|
[
"Courses"
] |
How many courses are there?
|
SELECT count(*) FROM Courses
|
easy
|
511 |
student_transcripts_tracking
|
[
"Courses"
] |
How is the math course described?
|
SELECT course_description FROM Courses WHERE course_name = 'math'
|
easy
|
512 |
student_transcripts_tracking
|
[
"Courses"
] |
What are the descriptions for all the math courses?
|
SELECT course_description FROM Courses WHERE course_name = 'math'
|
easy
|
513 |
student_transcripts_tracking
|
[
"Addresses"
] |
What is the zip code of the address in the city Port Chelsea?
|
SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'
|
easy
|
514 |
student_transcripts_tracking
|
[
"Addresses"
] |
What is the zip code for Port Chelsea?
|
SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'
|
easy
|
515 |
student_transcripts_tracking
|
[
"Degree_Programs",
"Departments"
] |
Which department offers the most number of degrees? List department name and id.
|
SELECT T2.department_name , T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY count(*) DESC LIMIT 1
|
extra
|
516 |
student_transcripts_tracking
|
[
"departments",
"degree_programs"
] |
What is the name and id of the department with the most number of degrees ?
|
select t2.department_name , t1.department_id from degree_programs as t1 join departments as t2 on t1.department_id = t2.department_id group by t1.department_id order by count(*) desc limit 1
|
extra
|
517 |
student_transcripts_tracking
|
[
"Degree_Programs"
] |
How many departments offer any degree?
|
SELECT count(DISTINCT department_id) FROM Degree_Programs
|
easy
|
518 |
student_transcripts_tracking
|
[
"Degree_Programs"
] |
How many different departments offer degrees?
|
SELECT count(DISTINCT department_id) FROM Degree_Programs
|
easy
|
519 |
student_transcripts_tracking
|
[
"Degree_Programs"
] |
How many different degree names are offered?
|
SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs
|
easy
|
520 |
student_transcripts_tracking
|
[
"Degree_Programs"
] |
How many different degrees are offered?
|
SELECT count(DISTINCT degree_summary_name) FROM Degree_Programs
|
easy
|
521 |
student_transcripts_tracking
|
[
"Degree_Programs",
"Departments"
] |
How many degrees does the engineering department offer?
|
SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'
|
medium
|
522 |
student_transcripts_tracking
|
[
"Degree_Programs",
"Departments"
] |
How many degrees does the engineering department have?
|
SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'
|
medium
|
523 |
student_transcripts_tracking
|
[
"Sections"
] |
What are the names and descriptions of all the sections?
|
SELECT section_name , section_description FROM Sections
|
medium
|
524 |
student_transcripts_tracking
|
[
"Sections"
] |
What are the names and descriptions for all the sections?
|
SELECT section_name , section_description FROM Sections
|
medium
|
525 |
student_transcripts_tracking
|
[
"Courses",
"Sections"
] |
What are the names and id of courses having at most 2 sections?
|
SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2
|
medium
|
526 |
student_transcripts_tracking
|
[
"Courses",
"Sections"
] |
What are the names and ids of every course with less than 2 sections?
|
SELECT T1.course_name , T1.course_id FROM Courses AS T1 JOIN Sections AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id HAVING count(*) <= 2
|
medium
|
527 |
student_transcripts_tracking
|
[
"Sections"
] |
List the section_name in reversed lexicographical order.
|
SELECT section_name FROM Sections ORDER BY section_name DESC
|
easy
|
528 |
student_transcripts_tracking
|
[
"Sections"
] |
What are the names of the sections in reverse alphabetical order?
|
SELECT section_name FROM Sections ORDER BY section_name DESC
|
easy
|
529 |
student_transcripts_tracking
|
[
"Semesters",
"Student_Enrolment"
] |
What is the semester which most student registered in? Show both the name and the id.
|
SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1
|
extra
|
530 |
student_transcripts_tracking
|
[
"Semesters",
"Student_Enrolment"
] |
For each semester, what is the name and id of the one with the most students registered?
|
SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1
|
extra
|
531 |
student_transcripts_tracking
|
[
"Departments"
] |
What is the description of the department whose name has the substring the computer?
|
SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'
|
medium
|
532 |
student_transcripts_tracking
|
[
"Departments"
] |
What is the department description for the one whose name has the word computer?
|
SELECT department_description FROM Departments WHERE department_name LIKE '%computer%'
|
medium
|
533 |
student_transcripts_tracking
|
[
"Student_Enrolment",
"Students"
] |
Who are enrolled in 2 degree programs in one semester? List the first name, middle name and last name and the id.
|
SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2
|
medium
|
534 |
student_transcripts_tracking
|
[
"Student_Enrolment",
"Students"
] |
What are the first, middle, and last names, along with the ids, of all students who enrolled in 2 degree programs in one semester?
|
SELECT T1.first_name , T1.middle_name , T1.last_name , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id HAVING count(*) = 2
|
medium
|
535 |
student_transcripts_tracking
|
[
"Degree_Programs",
"Student_Enrolment",
"Students"
] |
Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.
|
SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'
|
hard
|
536 |
student_transcripts_tracking
|
[
"Degree_Programs",
"Student_Enrolment",
"Students"
] |
What are the first, middle, and last names for everybody enrolled in a Bachelors program?
|
SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'
|
hard
|
537 |
student_transcripts_tracking
|
[
"Degree_Programs",
"Student_Enrolment"
] |
Find the kind of program which most number of students are enrolled in?
|
SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1
|
extra
|
538 |
student_transcripts_tracking
|
[
"Degree_Programs",
"Student_Enrolment"
] |
What is the degree summary name that has the most number of students enrolled?
|
SELECT T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_summary_name ORDER BY count(*) DESC LIMIT 1
|
extra
|
539 |
student_transcripts_tracking
|
[
"Degree_Programs",
"Student_Enrolment"
] |
Find the program which most number of students are enrolled in. List both the id and the summary.
|
SELECT T1.degree_program_id , T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1
|
extra
|
540 |
student_transcripts_tracking
|
[
"Degree_Programs",
"Student_Enrolment"
] |
What is the program id and the summary of the degree that has the most students enrolled?
|
SELECT T1.degree_program_id , T1.degree_summary_name FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id GROUP BY T1.degree_program_id ORDER BY count(*) DESC LIMIT 1
|
extra
|
541 |
student_transcripts_tracking
|
[
"Student_Enrolment",
"Students"
] |
Which student has enrolled for the most times in any program? List the id, first name, middle name, last name, the number of enrollments and student id.
|
SELECT T1.student_id , T1.first_name , T1.middle_name , T1.last_name , count(*) , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
|
extra
|
542 |
student_transcripts_tracking
|
[
"Student_Enrolment",
"Students"
] |
What is the first, middle, and last name, along with the id and number of enrollments, for the student who enrolled the most in any program?
|
SELECT T1.student_id , T1.first_name , T1.middle_name , T1.last_name , count(*) , T1.student_id FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
|
extra
|
543 |
student_transcripts_tracking
|
[
"Semesters",
"Student_Enrolment"
] |
Which semesters do not have any student enrolled? List the semester name.
|
SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )
|
hard
|
544 |
student_transcripts_tracking
|
[
"Semesters",
"Student_Enrolment"
] |
What is the name of the semester with no students enrolled?
|
SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )
|
hard
|
545 |
student_transcripts_tracking
|
[
"Courses",
"Student_Enrolment_Courses"
] |
What are all the course names of the courses which ever have students enrolled in?
|
SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id
|
easy
|
546 |
student_transcripts_tracking
|
[
"Courses",
"Student_Enrolment_Courses"
] |
What are the names of all courses that have some students enrolled?
|
SELECT DISTINCT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id
|
easy
|
547 |
student_transcripts_tracking
|
[
"Courses",
"Student_Enrolment_Courses"
] |
What's the name of the course with most number of enrollments?
|
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1
|
extra
|
548 |
student_transcripts_tracking
|
[
"Courses",
"Student_Enrolment_Courses"
] |
What is the name of the course with the most students enrolled?
|
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1
|
extra
|
549 |
student_transcripts_tracking
|
[
"Addresses",
"Student_Enrolment",
"Students"
] |
Find the last name of the students who currently live in the state of North Carolina but have not registered in any degree program.
|
SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id
|
extra
|
550 |
student_transcripts_tracking
|
[
"Addresses",
"Student_Enrolment",
"Students"
] |
What are the last name of the students who live in North Carolina but have not registered in any degree programs?
|
SELECT T1.last_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.current_address_id = T2.address_id WHERE T2.state_province_county = 'NorthCarolina' EXCEPT SELECT DISTINCT T3.last_name FROM Students AS T3 JOIN Student_Enrolment AS T4 ON T3.student_id = T4.student_id
|
extra
|
551 |
student_transcripts_tracking
|
[
"Transcript_Contents",
"Transcripts"
] |
Show the date and id of the transcript with at least 2 course results.
|
SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2
|
medium
|
552 |
student_transcripts_tracking
|
[
"Transcript_Contents",
"Transcripts"
] |
What is the date and id of the transcript with at least 2 courses listed?
|
SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id HAVING count(*) >= 2
|
medium
|
553 |
student_transcripts_tracking
|
[
"Students"
] |
What is the phone number of the man with the first name Timmothy and the last name Ward?
|
SELECT cell_mobile_number FROM Students WHERE first_name = 'Timmothy' AND last_name = 'Ward'
|
medium
|
554 |
student_transcripts_tracking
|
[
"students"
] |
What is the mobile phone number of the student named Timmothy Ward ?
|
select cell_mobile_number from students where first_name = 'timmothy' and last_name = 'ward'
|
medium
|
555 |
student_transcripts_tracking
|
[
"Students"
] |
Who is the first student to register? List the first name, middle name and last name.
|
SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1
|
medium
|
556 |
student_transcripts_tracking
|
[
"Students"
] |
What is the first, middle, and last name of the first student to register?
|
SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1
|
medium
|
557 |
student_transcripts_tracking
|
[
"Students"
] |
Who is the earliest graduate of the school? List the first name, middle name and last name.
|
SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1
|
medium
|
558 |
student_transcripts_tracking
|
[
"Students"
] |
What is the first, middle, and last name of the earliest school graduate?
|
SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1
|
medium
|
559 |
student_transcripts_tracking
|
[
"Students"
] |
Whose permanent address is different from his or her current address? List his or her first name.
|
SELECT first_name FROM Students WHERE current_address_id != permanent_address_id
|
easy
|
560 |
student_transcripts_tracking
|
[
"Students"
] |
What is the first name of the student whose permanent address is different from his or her current one?
|
SELECT first_name FROM Students WHERE current_address_id != permanent_address_id
|
easy
|
561 |
student_transcripts_tracking
|
[
"Addresses",
"Students"
] |
Which address holds the most number of students currently? List the address id and all lines.
|
SELECT T1.address_id , T1.line_1 , T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1
|
extra
|
562 |
student_transcripts_tracking
|
[
"Addresses",
"Students"
] |
What is the id, line 1, and line 2 of the address with the most students?
|
SELECT T1.address_id , T1.line_1 , T1.line_2 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.current_address_id GROUP BY T1.address_id ORDER BY count(*) DESC LIMIT 1
|
extra
|
563 |
student_transcripts_tracking
|
[
"Transcripts"
] |
On average, when were the transcripts printed?
|
SELECT avg(transcript_date) FROM Transcripts
|
easy
|
564 |
student_transcripts_tracking
|
[
"Transcripts"
] |
What is the average transcript date?
|
SELECT avg(transcript_date) FROM Transcripts
|
easy
|
565 |
student_transcripts_tracking
|
[
"Transcripts"
] |
When is the first transcript released? List the date and details.
|
SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1
|
medium
|
566 |
student_transcripts_tracking
|
[
"Transcripts"
] |
What is the earliest date of a transcript release, and what details can you tell me?
|
SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1
|
medium
|
567 |
student_transcripts_tracking
|
[
"Transcripts"
] |
How many transcripts are released?
|
SELECT count(*) FROM Transcripts
|
easy
|
568 |
student_transcripts_tracking
|
[
"Transcripts"
] |
How many transcripts are listed?
|
SELECT count(*) FROM Transcripts
|
easy
|
569 |
student_transcripts_tracking
|
[
"Transcripts"
] |
What is the last transcript release date?
|
SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1
|
medium
|
570 |
student_transcripts_tracking
|
[
"Transcripts"
] |
When was the last transcript released?
|
SELECT transcript_date FROM Transcripts ORDER BY transcript_date DESC LIMIT 1
|
medium
|
571 |
student_transcripts_tracking
|
[
"Transcript_Contents"
] |
How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.
|
SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1
|
hard
|
572 |
student_transcripts_tracking
|
[
"Transcript_Contents"
] |
What is the maximum number of times that a course shows up in different transcripts and what is that course's enrollment id?
|
SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1
|
hard
|
573 |
student_transcripts_tracking
|
[
"Transcript_Contents",
"Transcripts"
] |
Show the date of the transcript which shows the least number of results, also list the id.
|
SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1
|
extra
|
574 |
student_transcripts_tracking
|
[
"Transcript_Contents",
"Transcripts"
] |
What is the date and id of the transcript with the least number of results?
|
SELECT T2.transcript_date , T1.transcript_id FROM Transcript_Contents AS T1 JOIN Transcripts AS T2 ON T1.transcript_id = T2.transcript_id GROUP BY T1.transcript_id ORDER BY count(*) ASC LIMIT 1
|
extra
|
575 |
student_transcripts_tracking
|
[
"Degree_Programs",
"Student_Enrolment"
] |
Find the semester when both Master students and Bachelor students got enrolled in.
|
SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'
|
extra
|
576 |
student_transcripts_tracking
|
[
"Degree_Programs",
"Student_Enrolment"
] |
What is the id of the semester that had both Masters and Bachelors students enrolled?
|
SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Master' INTERSECT SELECT DISTINCT T2.semester_id FROM Degree_Programs AS T1 JOIN Student_Enrolment AS T2 ON T1.degree_program_id = T2.degree_program_id WHERE degree_summary_name = 'Bachelor'
|
extra
|
577 |
student_transcripts_tracking
|
[
"Students"
] |
How many different addresses do the students currently live?
|
SELECT count(DISTINCT current_address_id) FROM Students
|
easy
|
578 |
student_transcripts_tracking
|
[
"Students"
] |
What are the different addresses that have students living there?
|
SELECT count(DISTINCT current_address_id) FROM Students
|
easy
|
579 |
student_transcripts_tracking
|
[
"Students"
] |
List all the student details in reversed lexicographical order.
|
SELECT other_student_details FROM Students ORDER BY other_student_details DESC
|
easy
|
580 |
student_transcripts_tracking
|
[
"Students"
] |
What other details can you tell me about students in reverse alphabetical order?
|
SELECT other_student_details FROM Students ORDER BY other_student_details DESC
|
easy
|
581 |
student_transcripts_tracking
|
[
"Sections"
] |
Describe the section h.
|
SELECT section_description FROM Sections WHERE section_name = 'h'
|
easy
|
582 |
student_transcripts_tracking
|
[
"Sections"
] |
What is the description for the section named h?
|
SELECT section_description FROM Sections WHERE section_name = 'h'
|
easy
|
583 |
student_transcripts_tracking
|
[
"addresses",
"students"
] |
Find the first name of the students who permanently live in the country Haiti or have the cell phone number 09700166582 .
|
select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id = t2.address_id where t2.country = 'haiti' or t1.cell_mobile_number = '09700166582'
|
hard
|
584 |
student_transcripts_tracking
|
[
"addresses",
"students"
] |
What are the first names of the students who live in Haiti permanently or have the cell phone number 09700166582 ?
|
select t1.first_name from students as t1 join addresses as t2 on t1.permanent_address_id = t2.address_id where t2.country = 'haiti' or t1.cell_mobile_number = '09700166582'
|
hard
|
585 |
tvshow
|
[
"Cartoon"
] |
List the title of all cartoons in alphabetical order.
|
SELECT Title FROM Cartoon ORDER BY title
|
easy
|
586 |
tvshow
|
[
"Cartoon"
] |
What are the titles of the cartoons sorted alphabetically?
|
SELECT Title FROM Cartoon ORDER BY title
|
easy
|
587 |
tvshow
|
[
"Cartoon"
] |
List all cartoon directed by "Ben Jones".
|
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones";
|
easy
|
588 |
tvshow
|
[
"Cartoon"
] |
What are the names of all cartoons directed by Ben Jones?
|
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones";
|
easy
|
589 |
tvshow
|
[
"Cartoon"
] |
How many cartoons were written by "Joseph Kuhr"?
|
SELECT count(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr";
|
easy
|
590 |
tvshow
|
[
"Cartoon"
] |
What is the number of cartoones written by Joseph Kuhr?
|
SELECT count(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr";
|
easy
|
591 |
tvshow
|
[
"Cartoon"
] |
list all cartoon titles and their directors ordered by their air date
|
SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date
|
medium
|
592 |
tvshow
|
[
"Cartoon"
] |
What is the name and directors of all the cartoons that are ordered by air date?
|
SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date
|
medium
|
593 |
tvshow
|
[
"Cartoon"
] |
List the title of all cartoon directed by "Ben Jones" or "Brandon Vietti".
|
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti";
|
medium
|
594 |
tvshow
|
[
"Cartoon"
] |
What are the titles of all cartoons directed by Ben Jones or Brandon Vietti?
|
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti";
|
medium
|
595 |
tvshow
|
[
"TV_Channel"
] |
Which country has the most of TV Channels? List the country and number of TV Channels it has.
|
SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;
|
hard
|
596 |
tvshow
|
[
"TV_Channel"
] |
What is the country with the most number of TV Channels and how many does it have?
|
SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;
|
hard
|
597 |
tvshow
|
[
"TV_Channel"
] |
List the number of different series names and contents in the TV Channel table.
|
SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;
|
medium
|
598 |
tvshow
|
[
"TV_Channel"
] |
How many different series and contents are listed in the TV Channel table?
|
SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;
|
medium
|
599 |
tvshow
|
[
"TV_Channel"
] |
What is the content of TV Channel with serial name "Sky Radio"?
|
SELECT Content FROM TV_Channel WHERE series_name = "Sky Radio";
|
easy
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.