Unnamed: 0
int64
0
78.6k
answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
translated_answer
stringlengths
12
992
1,900
SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE DEPT_NAME = "Accounting"
Find the number of professors in accounting department.
CREATE TABLE professor (dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR)
Encontre o número de professores no departamento de contabilidade.
1,901
SELECT COUNT(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE = "ACCT-211"
How many professors are teaching class with code ACCT-211?
CREATE TABLE CLASS (PROF_NUM VARCHAR, CRS_CODE VARCHAR)
Quantos professores estão dando aula com o código ACCT-211?
1,902
SELECT T3.EMP_FNAME, T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = "Biology"
What is the first and last name of the professor in biology department?
CREATE TABLE professor (dept_code VARCHAR, EMP_NUM VARCHAR); CREATE TABLE department (dept_code VARCHAR); CREATE TABLE employee (EMP_FNAME VARCHAR, EMP_LNAME VARCHAR, EMP_NUM VARCHAR)
Qual é o primeiro e último nome do professor no departamento de biologia?
1,903
SELECT DISTINCT T1.EMP_FNAME, T1.EMP_DOB FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = "ACCT-211"
What are the first names and date of birth of professors teaching course ACCT-211?
CREATE TABLE CLASS (PROF_NUM VARCHAR); CREATE TABLE employee (EMP_FNAME VARCHAR, EMP_DOB VARCHAR, EMP_NUM VARCHAR)
Quais são os primeiros nomes e data de nascimento do curso de ensino de professores ACCT-211?
1,904
SELECT COUNT(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'
How many classes are professor whose last name is Graztevski has?
CREATE TABLE CLASS (PROF_NUM VARCHAR); CREATE TABLE employee (EMP_NUM VARCHAR, EMP_LNAME VARCHAR)
Quantas aulas tem um professor cujo sobrenome é Graztevski?
1,905
SELECT school_code FROM department WHERE dept_name = "Accounting"
What is the code of the school where the accounting department belongs to?
CREATE TABLE department (school_code VARCHAR, dept_name VARCHAR)
Qual é o código da escola onde o departamento de contabilidade pertence?
1,906
SELECT crs_credit, crs_description FROM course WHERE crs_code = 'CIS-220'
How many credits does course CIS-220 have, and what its description?
CREATE TABLE course (crs_credit VARCHAR, crs_description VARCHAR, crs_code VARCHAR)
Quantos créditos o curso CIS-220 tem e qual é a sua descrição?
1,907
SELECT dept_address FROM department WHERE dept_name = 'History'
what is the address of history department?
CREATE TABLE department (dept_address VARCHAR, dept_name VARCHAR)
Qual é o endereço do departamento de história?
1,908
SELECT COUNT(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'
How many different locations does the school with code BUS has?
CREATE TABLE department (dept_address VARCHAR, school_code VARCHAR)
Quantos locais diferentes a escola com código BUS tem?
1,909
SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code
How many different locations does each school have?
CREATE TABLE department (school_code VARCHAR, dept_address VARCHAR)
Quantos locais diferentes cada escola tem?
1,910
SELECT crs_credit, crs_description FROM course WHERE crs_code = 'QM-261'
Find the description and credit for the course QM-261?
CREATE TABLE course (crs_credit VARCHAR, crs_description VARCHAR, crs_code VARCHAR)
Encontrar a descrição e crédito para o curso QM-261?
1,911
SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code
Find the number of departments in each school.
CREATE TABLE department (school_code VARCHAR, dept_name VARCHAR)
Encontre o número de departamentos em cada escola.
1,912
SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code HAVING COUNT(DISTINCT dept_name) < 5
Find the number of different departments in each school whose number of different departments is less than 5.
CREATE TABLE department (school_code VARCHAR, dept_name VARCHAR)
Encontre o número de departamentos diferentes em cada escola cujo número de departamentos diferentes é inferior a 5.
1,913
SELECT COUNT(*), crs_code FROM CLASS GROUP BY crs_code
How many sections does each course has?
CREATE TABLE CLASS (crs_code VARCHAR)
Quantas seções cada curso tem?
1,914
SELECT SUM(crs_credit), dept_code FROM course GROUP BY dept_code
What is the total credit does each department offer?
CREATE TABLE course (dept_code VARCHAR, crs_credit INTEGER)
Qual é o crédito total que cada departamento oferece?
1,915
SELECT COUNT(*), class_room FROM CLASS GROUP BY class_room HAVING COUNT(*) >= 2
Find the number of classes offered for all class rooms that held at least 2 classes.
CREATE TABLE CLASS (class_room VARCHAR)
Encontre o número de aulas oferecidas para todas as salas de aula que possuíam pelo menos 2 aulas.
1,916
SELECT COUNT(*), dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code GROUP BY dept_code
Find the number of classes in each department.
CREATE TABLE CLASS (crs_code VARCHAR); CREATE TABLE course (crs_code VARCHAR)
Encontre o número de aulas em cada departamento.
1,917
SELECT COUNT(*), T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T2.dept_code = T3.dept_code GROUP BY T3.school_code
Find the number of classes in each school.
CREATE TABLE department (school_code VARCHAR, dept_code VARCHAR); CREATE TABLE CLASS (crs_code VARCHAR); CREATE TABLE course (crs_code VARCHAR, dept_code VARCHAR)
Encontre o número de aulas em cada escola.
1,918
SELECT COUNT(*), T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code
What is the number of professors for different school?
CREATE TABLE department (school_code VARCHAR, dept_code VARCHAR); CREATE TABLE professor (dept_code VARCHAR)
Qual é o número de professores para diferentes escolas?
1,919
SELECT emp_jobcode, COUNT(*) FROM employee GROUP BY emp_jobcode ORDER BY COUNT(*) DESC LIMIT 1
Find the count and code of the job has most employees.
CREATE TABLE employee (emp_jobcode VARCHAR)
Encontre a contagem e o código do trabalho que tem a maioria dos funcionários.
1,920
SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.school_code ORDER BY COUNT(*) LIMIT 1
Which school has the smallest amount of professors?
CREATE TABLE department (school_code VARCHAR, dept_code VARCHAR); CREATE TABLE professor (dept_code VARCHAR)
Qual escola tem a menor quantidade de professores?
1,921
SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code
Find the number of professors with a Ph.D. degree in each department.
CREATE TABLE professor (dept_code VARCHAR, prof_high_degree VARCHAR)
Encontre o número de professores com um Ph.D. grau em cada departamento.
1,922
SELECT COUNT(*), dept_code FROM student GROUP BY dept_code
Find the number of students for each department.
CREATE TABLE student (dept_code VARCHAR)
Encontre o número de alunos para cada departamento.
1,923
SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code
Find the total number of hours have done for all students in each department.
CREATE TABLE student (dept_code VARCHAR, stu_hrs INTEGER)
Descubra o número total de horas feitas para todos os alunos em cada departamento.
1,924
SELECT MAX(stu_gpa), AVG(stu_gpa), MIN(stu_gpa), dept_code FROM student GROUP BY dept_code
Find the max, average, and minimum gpa of all students in each department.
CREATE TABLE student (dept_code VARCHAR, stu_gpa INTEGER)
Encontre o gpa máximo, médio e mínimo de todos os alunos em cada departamento.
1,925
SELECT T2.dept_name, AVG(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY AVG(T1.stu_gpa) DESC LIMIT 1
What is the name and the average gpa of department whose students have the highest average gpa?
CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE student (stu_gpa INTEGER, dept_code VARCHAR)
Qual é o nome e o gpa médio do departamento cujos alunos têm o gpa médio mais alto?
1,926
SELECT COUNT(DISTINCT school_code) FROM department
how many schools exist in total?
CREATE TABLE department (school_code VARCHAR)
Quantas escolas existem no total?
1,927
SELECT COUNT(DISTINCT class_code) FROM CLASS
How many different classes are there?
CREATE TABLE CLASS (class_code VARCHAR)
Quantas classes diferentes existem?
1,928
SELECT COUNT(DISTINCT crs_code) FROM CLASS
How many courses are offered?
CREATE TABLE CLASS (crs_code VARCHAR)
Quantos cursos são oferecidos?
1,929
SELECT COUNT(DISTINCT dept_name) FROM department
How many departments does the college has?
CREATE TABLE department (dept_name VARCHAR)
Quantos departamentos a universidade tem?
1,930
SELECT COUNT(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code = T2.dept_code WHERE dept_name = "Computer Info. Systems"
How many courses are offered by the Computer Info. Systems department?
CREATE TABLE course (dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR)
Quantos cursos são oferecidos pela Computer Info. Departamento de sistemas?
1,931
SELECT COUNT(DISTINCT class_section) FROM CLASS WHERE crs_code = 'ACCT-211'
How many sections does course ACCT-211 has?
CREATE TABLE CLASS (class_section VARCHAR, crs_code VARCHAR)
Quantas seções o curso ACCT-211 tem?
1,932
SELECT SUM(T1.crs_credit), T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code GROUP BY T1.dept_code
Find the total credits of all classes offered by each department.
CREATE TABLE CLASS (crs_code VARCHAR); CREATE TABLE course (dept_code VARCHAR, crs_credit INTEGER, crs_code VARCHAR)
Encontre o total de créditos de todas as aulas oferecidas por cada departamento.
1,933
SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code = T2.crs_code JOIN department AS T3 ON T1.dept_code = T3.dept_code GROUP BY T1.dept_code ORDER BY SUM(T1.crs_credit) DESC LIMIT 1
Find the name of the department that offers the largest number of credits of all classes.
CREATE TABLE CLASS (crs_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE course (dept_code VARCHAR, crs_code VARCHAR, crs_credit INTEGER)
Encontre o nome do departamento que oferece o maior número de créditos de todas as classes.
1,934
SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code WHERE T1.crs_code = 'ACCT-211'
How many students enrolled in class ACCT-211?
CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR)
Quantos alunos matriculados na classe ACCT-211?
1,935
SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211'
What is the first name of each student enrolled in class ACCT-211?
CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR)
Qual é o primeiro nome de cada aluno matriculado na classe ACCT-211?
1,936
SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' AND T2.enroll_grade = 'C'
What is the first name of students enrolled in class ACCT-211 and got grade C?
CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR, enroll_grade VARCHAR)
Qual é o primeiro nome dos alunos matriculados na classe ACCT-211 e obteve o grau C?
1,937
SELECT COUNT(*) FROM employee
Find the total number of employees.
CREATE TABLE employee (Id VARCHAR)
Encontre o número total de funcionários.
1,938
SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.'
How many professors do have a Ph.D. degree?
CREATE TABLE professor (prof_high_degree VARCHAR)
Quantos professores têm um Ph.D. grau?
1,939
SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting'
How many students are enrolled in the class taught by some professor from the accounting department?
CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE course (crs_code VARCHAR, dept_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR)
Quantos alunos estão matriculados na aula ministrada por algum professor do departamento de contabilidade?
1,940
SELECT T4.dept_name FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code GROUP BY T3.dept_code ORDER BY COUNT(*) DESC LIMIT 1
What is the name of the department that has the largest number of students enrolled?
CREATE TABLE enroll (class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE course (dept_code VARCHAR, crs_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)
Qual é o nome do departamento que tem o maior número de alunos matriculados?
1,941
SELECT dept_name FROM department ORDER BY dept_name
list names of all departments ordered by their names.
CREATE TABLE department (dept_name VARCHAR)
listar nomes de todos os departamentos ordenados por seus nomes.
1,942
SELECT class_code FROM CLASS WHERE class_room = 'KLR209'
List the codes of all courses that take place in room KLR209.
CREATE TABLE CLASS (class_code VARCHAR, class_room VARCHAR)
Liste os códigos de todos os cursos que ocorrem no quarto KLR209.
1,943
SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' ORDER BY emp_dob
List the first name of all employees with job code PROF ordered by their date of birth.
CREATE TABLE employee (emp_fname VARCHAR, emp_jobcode VARCHAR, emp_dob VARCHAR)
Liste o primeiro nome de todos os funcionários com o código de trabalho PROF ordenado pela data de nascimento.
1,944
SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname
Find the first names and offices of all professors sorted by alphabetical order of their first name.
CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
Encontre os primeiros nomes e escritórios de todos os professores classificados por ordem alfabética de seu primeiro nome.
1,945
SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob LIMIT 1
What is the first and last name of the oldest employee?
CREATE TABLE employee (emp_fname VARCHAR, emp_lname VARCHAR, emp_dob VARCHAR)
Qual é o primeiro e último nome do funcionário mais velho?
1,946
SELECT stu_fname, stu_lname, stu_gpa FROM student WHERE stu_gpa > 3 ORDER BY stu_dob DESC LIMIT 1
What is the first, last name, gpa of the youngest one among students whose GPA is above 3?
CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_gpa INTEGER, stu_dob VARCHAR)
Qual é o primeiro, último nome, gpa do mais jovem entre os alunos cujo GPA está acima de 3?
1,947
SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE enroll_grade = 'C'
What is the first name of students who got grade C in any class?
CREATE TABLE student (stu_num VARCHAR); CREATE TABLE enroll (stu_num VARCHAR)
Qual é o primeiro nome dos alunos que obtiveram o grau C em qualquer classe?
1,948
SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) LIMIT 1
What is the name of department where has the smallest number of professors?
CREATE TABLE professor (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)
Qual é o nome do departamento onde tem o menor número de professores?
1,949
SELECT T2.dept_name, T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.prof_high_degree = 'Ph.D.' GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1
What is the name of department where has the largest number of professors with a Ph.D. degree?
CREATE TABLE professor (dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)
Qual é o nome do departamento onde tem o maior número de professores com um Ph.D. grau?
1,950
SELECT emp_fname FROM employee WHERE emp_jobcode = 'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num
What are the first names of the professors who do not teach a class.
CREATE TABLE employee (emp_fname VARCHAR, emp_jobcode VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
Quais são os primeiros nomes dos professores que não ensinam uma aula?
1,951
SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num = T5.prof_num
What is the first names of the professors from the history department who do not teach a class.
CREATE TABLE professor (emp_num VARCHAR, dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
Quais são os primeiros nomes dos professores do departamento de história que não ensinam uma aula?
1,952
SELECT T1.emp_lname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History'
What is the last name and office of the professor from the history department?
CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE employee (emp_lname VARCHAR, emp_num VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR)
Qual é o sobrenome e o cargo do professor do departamento de história?
1,953
SELECT T3.dept_name, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T1.emp_lname = 'Heffington'
What is department name and office for the professor whose last name is Heffington?
CREATE TABLE employee (emp_num VARCHAR, emp_lname VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR)
Qual é o nome do departamento e do escritório do professor cujo sobrenome é Heffington?
1,954
SELECT T1.emp_lname, T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102'
Find the last name and hire date of the professor who is in office DRE 102.
CREATE TABLE professor (emp_num VARCHAR, prof_office VARCHAR); CREATE TABLE employee (emp_lname VARCHAR, emp_hiredate VARCHAR, emp_num VARCHAR)
Encontre o sobrenome e a data de contratação do professor que está no escritório DRE 102.
1,955
SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson'
What is the code of the course which the student whose last name is Smithson took?
CREATE TABLE student (stu_num VARCHAR, stu_lname VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR); CREATE TABLE CLASS (crs_code VARCHAR, class_code VARCHAR)
Qual é o código do curso que o aluno cujo sobrenome é Smithson tomou?
1,956
SELECT T4.crs_description, T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num JOIN course AS T4 ON T4.crs_code = T1.crs_code WHERE T3.stu_lname = 'Smithson'
What are the description and credit of the course which the student whose last name is Smithson took?
CREATE TABLE student (stu_num VARCHAR, stu_lname VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_credit VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR)
Qual é a descrição e o crédito do curso que o aluno cujo sobrenome é Smithson tomou?
1,957
SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'
How many professors who has a either Ph.D. or MA degree?
CREATE TABLE professor (prof_high_degree VARCHAR)
Quantos professores que têm um Ph.D. ou mestrado?
1,958
SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology'
How many professors who are from either Accounting or Biology department?
CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (dept_code VARCHAR)
Quantos professores são do departamento de Contabilidade ou Biologia?
1,959
SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261'
Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261.
CREATE TABLE CLASS (prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
Encontre o primeiro nome do professor que está dando dois cursos com os códigos CIS-220 e QM-261.
1,960
SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems'
Find the first name of student who is taking classes from accounting and Computer Info. Systems departments
CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE course (crs_code VARCHAR, dept_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR)
Encontre o primeiro nome do aluno que está tendo aulas de contabilidade e Informações de Computador.
1,961
SELECT AVG(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211'
What is the average gpa of the students enrolled in the course with code ACCT-211?
CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_gpa INTEGER, stu_num VARCHAR)
Qual é a média de gpa dos alunos matriculados no curso com o código ACCT-211?
1,962
SELECT stu_gpa, stu_phone, stu_fname FROM student ORDER BY stu_gpa DESC LIMIT 5
What is the first name, gpa and phone number of the top 5 students with highest gpa?
CREATE TABLE student (stu_gpa VARCHAR, stu_phone VARCHAR, stu_fname VARCHAR)
Qual é o primeiro nome, gpa e número de telefone dos 5 melhores alunos com maior gpa?
1,963
SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1
What is the department name of the students with lowest gpa belongs to?
CREATE TABLE student (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)
Qual é o nome do departamento dos alunos com menor gpa pertence?
1,964
SELECT stu_fname, stu_gpa FROM student WHERE stu_gpa < (SELECT AVG(stu_gpa) FROM student)
Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.
CREATE TABLE student (stu_fname VARCHAR, stu_gpa INTEGER)
Encontre o primeiro nome e gpa dos alunos cujo gpa é menor do que o gpa médio de todos os alunos.
1,965
SELECT T2.dept_name, T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1
Find the name and address of the department that has the highest number of students.
CREATE TABLE student (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_address VARCHAR, dept_code VARCHAR)
Encontre o nome e o endereço do departamento que tem o maior número de alunos.
1,966
SELECT T2.dept_name, T2.dept_address, COUNT(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 3
Find the name, address, number of students in the departments that have the top 3 highest number of students.
CREATE TABLE student (dept_code VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_address VARCHAR, dept_code VARCHAR)
Encontre o nome, endereço, número de alunos nos departamentos que têm o maior número de alunos.
1,967
SELECT T1.emp_fname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T3.dept_code = T2.dept_code WHERE T3.dept_name = 'History' AND T2.prof_high_degree = 'Ph.D.'
Find the first name and office of the professor who is in the history department and has a Ph.D. degree.
CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
Encontre o primeiro nome e escritório do professor que está no departamento de história e tem um Ph.D. grau.
1,968
SELECT T2.emp_fname, T1.crs_code FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num
Find the first names of all instructors who have taught some course and the course code.
CREATE TABLE CLASS (crs_code VARCHAR, prof_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
Encontre os primeiros nomes de todos os instrutores que ensinaram algum curso e o código do curso.
1,969
SELECT T2.emp_fname, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code
Find the first names of all instructors who have taught some course and the course description.
CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR, crs_code VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
Encontre os primeiros nomes de todos os instrutores que ensinaram algum curso e a descrição do curso.
1,970
SELECT T2.emp_fname, T4.prof_office, T3.crs_description FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num
Find the first names and offices of all instructors who have taught some course and also find the course description.
CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR, crs_code VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
Encontre os primeiros nomes e escritórios de todos os instrutores que ensinaram algum curso e também encontre a descrição do curso.
1,971
SELECT T2.emp_fname, T4.prof_office, T3.crs_description, T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN professor AS T4 ON T2.emp_num = T4.emp_num JOIN department AS T5 ON T4.dept_code = T5.dept_code
Find the first names and offices of all instructors who have taught some course and the course description and the department name.
CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR, crs_code VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR)
Encontre os primeiros nomes e escritórios de todos os instrutores que ensinaram algum curso e a descrição do curso e o nome do departamento.
1,972
SELECT T1.stu_fname, T1.stu_lname, T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code
Find names of all students who took some course and the course description.
CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE course (crs_description VARCHAR, crs_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_num VARCHAR)
Encontre os nomes de todos os alunos que fizeram algum curso e a descrição do curso.
1,973
SELECT T1.stu_fname, T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A'
Find names of all students who took some course and got A or C.
CREATE TABLE enroll (stu_num VARCHAR, enroll_grade VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_lname VARCHAR, stu_num VARCHAR)
Encontre nomes de todos os alunos que fizeram algum curso e obtiveram A ou C.
1,974
SELECT T2.emp_fname, T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Accounting'
Find the first names of all professors in the Accounting department who is teaching some course and the class room.
CREATE TABLE CLASS (class_room VARCHAR, prof_num VARCHAR); CREATE TABLE professor (emp_num VARCHAR, dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
Encontre os primeiros nomes de todos os professores do departamento de contabilidade que estão ensinando algum curso e a sala de aula.
1,975
SELECT DISTINCT T2.emp_fname, T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num JOIN professor AS T3 ON T2.emp_num = T3.emp_num JOIN department AS T4 ON T4.dept_code = T3.dept_code WHERE T4.dept_name = 'Computer Info. Systems'
Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.
CREATE TABLE professor (prof_high_degree VARCHAR, emp_num VARCHAR, dept_code VARCHAR); CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR)
Encontre os primeiros nomes e o grau de todos os professores que estão ensinando alguma classe em Informações de Computador.
1,976
SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'A' AND T2.class_code = 10018
What is the last name of the student who got a grade A in the class with code 10018.
CREATE TABLE enroll (stu_num VARCHAR, enroll_grade VARCHAR, class_code VARCHAR); CREATE TABLE student (stu_lname VARCHAR, stu_num VARCHAR)
Qual é o sobrenome do aluno que obteve um grau A na classe com o código 10018.
1,977
SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T1.dept_code = T3.dept_code WHERE T3.dept_name = 'History' AND T1.prof_high_degree <> 'Ph.D.'
Find the first name and office of history professor who did not get a Ph.D. degree.
CREATE TABLE department (dept_code VARCHAR, dept_name VARCHAR); CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR, dept_code VARCHAR, prof_high_degree VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR)
Encontre o primeiro nome e escritório do professor de história que não obteve um Ph.D. grau.
1,978
SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num = T2.emp_num GROUP BY T1.prof_num HAVING COUNT(*) > 1
Find the first names of professors who are teaching more than one class.
CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR); CREATE TABLE CLASS (prof_num VARCHAR)
Encontre os primeiros nomes de professores que estão ensinando mais de uma classe.
1,979
SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING COUNT(*) = 1
Find the first names of students who took exactly one class.
CREATE TABLE enroll (stu_num VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR)
Encontre os primeiros nomes dos alunos que fizeram exatamente uma aula.
1,980
SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'
Find the name of department that offers the class whose description has the word "Statistics".
CREATE TABLE course (dept_code VARCHAR, crs_description VARCHAR); CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR)
Encontre o nome do departamento que oferece a classe cuja descrição tem a palavra "Estatísticas".
1,981
SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname LIKE 'S%'
What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class?
CREATE TABLE enroll (stu_num VARCHAR, class_code VARCHAR); CREATE TABLE CLASS (class_code VARCHAR, crs_code VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR, stu_lname VARCHAR)
Qual é o primeiro nome do aluno cujo sobrenome começa com a letra S e está fazendo a aula ACCT-211?
1,982
SELECT COUNT(*) FROM club
How many clubs are there?
CREATE TABLE club (Id VARCHAR)
Quantos clubes existem?
1,983
SELECT DISTINCT Region FROM club ORDER BY Region
List the distinct region of clubs in ascending alphabetical order.
CREATE TABLE club (Region VARCHAR)
Liste a região distinta dos clubes em ordem alfabética ascendente.
1,984
SELECT AVG(Gold) FROM club_rank
What is the average number of gold medals for clubs?
CREATE TABLE club_rank (Gold INTEGER)
Qual é o número médio de medalhas de ouro para clubes?
1,985
SELECT Competition_type, Country FROM competition
What are the types and countries of competitions?
CREATE TABLE competition (Competition_type VARCHAR, Country VARCHAR)
Quais são os tipos e países das competições?
1,986
SELECT DISTINCT YEAR FROM competition WHERE Competition_type <> "Tournament"
What are the distinct years in which the competitions type is not "Tournament"?
CREATE TABLE competition (YEAR VARCHAR, Competition_type VARCHAR)
Quais são os anos distintos em que o tipo de competição não é "Tournament"?
1,987
SELECT MAX(Silver), MIN(Silver) FROM club_rank
What are the maximum and minimum number of silver medals for clubs.
CREATE TABLE club_rank (Silver INTEGER)
Qual é o número máximo e mínimo de medalhas de prata para os clubes?
1,988
SELECT COUNT(*) FROM club_rank WHERE Total < 10
How many clubs have total medals less than 10?
CREATE TABLE club_rank (Total INTEGER)
Quantos clubes têm medalhas totais inferiores a 10?
1,989
SELECT name FROM club ORDER BY Start_year
List all club names in ascending order of start year.
CREATE TABLE club (name VARCHAR, Start_year VARCHAR)
Listar todos os nomes de clubes em ordem crescente de início do ano.
1,990
SELECT name FROM club ORDER BY name DESC
List all club names in descending alphabetical order.
CREATE TABLE club (name VARCHAR)
Listar todos os nomes dos clubes em ordem alfabética decrescente.
1,991
SELECT T1.name, T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID
Please show the names and the players of clubs.
CREATE TABLE club (name VARCHAR, Club_ID VARCHAR); CREATE TABLE player (Player_id VARCHAR, Club_ID VARCHAR)
Por favor, mostre os nomes e os jogadores dos clubes.
1,992
SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T2.Position = "Right Wing"
Show the names of clubs that have players with position "Right Wing".
CREATE TABLE club (name VARCHAR, Club_ID VARCHAR); CREATE TABLE player (Club_ID VARCHAR, Position VARCHAR)
Mostre os nomes dos clubes que têm jogadores com a posição "Ala Direita".
1,993
SELECT AVG(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID WHERE T1.name = "AIB"
What is the average points of players from club with name "AIB".
CREATE TABLE player (Points INTEGER, Club_ID VARCHAR); CREATE TABLE club (Club_ID VARCHAR, name VARCHAR)
Quais são os pontos médios dos jogadores do clube com o nome "AIB".
1,994
SELECT POSITION, AVG(Points) FROM player GROUP BY POSITION
List the position of players and the average number of points of players of each position.
CREATE TABLE player (POSITION VARCHAR, Points INTEGER)
Liste a posição dos jogadores e o número médio de pontos de cada posição.
1,995
SELECT POSITION FROM player GROUP BY name HAVING AVG(Points) >= 20
List the position of players with average number of points scored by players of that position bigger than 20.
CREATE TABLE player (POSITION VARCHAR, name VARCHAR, Points INTEGER)
Liste a posição dos jogadores com o número médio de pontos marcados por jogadores dessa posição maior que 20.
1,996
SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type
List the types of competition and the number of competitions of each type.
CREATE TABLE competition (Competition_type VARCHAR)
Liste os tipos de competição e o número de competições de cada tipo.
1,997
SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1
List the most common type of competition.
CREATE TABLE competition (Competition_type VARCHAR)
Liste o tipo mais comum de competição.
1,998
SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*) <= 5
List the types of competition that have at most five competitions of that type.
CREATE TABLE competition (Competition_type VARCHAR)
Listar os tipos de competição que têm no máximo cinco competições desse tipo.
1,999
SELECT name FROM CLub WHERE NOT Club_ID IN (SELECT Club_ID FROM player)
List the names of clubs that do not have any players.
CREATE TABLE player (name VARCHAR, Club_ID VARCHAR); CREATE TABLE CLub (name VARCHAR, Club_ID VARCHAR)
Listar os nomes dos clubes que não têm jogadores.