db_id
stringclasses
20 values
query
stringlengths
20
422
question
stringlengths
18
174
query_toks
listlengths
4
63
query_toks_no_value
listlengths
4
88
question_toks
listlengths
5
33
schema
stringclasses
20 values
network_1
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id
Show name of all students who have some friends and also are liked by someone else.
[ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "INTERSECT", "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.liked_id", "=", "T2.id" ]
[ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "intersect", "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2...
[ "Show", "name", "of", "all", "students", "who", "have", "some", "friends", "and", "also", "are", "liked", "by", "someone", "else", "." ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id
What are the names of high schoolers who both have friends and are liked?
[ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "INTERSECT", "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.liked_id", "=", "T2.id" ]
[ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "intersect", "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2...
[ "What", "are", "the", "names", "of", "high", "schoolers", "who", "both", "have", "friends", "and", "are", "liked", "?" ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT student_id , count(*) FROM Likes GROUP BY student_id
Count the number of likes for each student id.
[ "SELECT", "student_id", ",", "count", "(", "*", ")", "FROM", "Likes", "GROUP", "BY", "student_id" ]
[ "select", "student_id", ",", "count", "(", "*", ")", "from", "likes", "group", "by", "student_id" ]
[ "Count", "the", "number", "of", "likes", "for", "each", "student", "id", "." ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT student_id , count(*) FROM Likes GROUP BY student_id
How many likes correspond to each student id?
[ "SELECT", "student_id", ",", "count", "(", "*", ")", "FROM", "Likes", "GROUP", "BY", "student_id" ]
[ "select", "student_id", ",", "count", "(", "*", ")", "from", "likes", "group", "by", "student_id" ]
[ "How", "many", "likes", "correspond", "to", "each", "student", "id", "?" ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id
Show the names of high schoolers who have likes, and numbers of likes for each.
[ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id" ]
[ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id" ]
[ "Show", "the", "names", "of", "high", "schoolers", "who", "have", "likes", ",", "and", "numbers", "of", "likes", "for", "each", "." ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT T2.name , count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id
What are the names of high schoolers who have likes, and how many likes does each have?
[ "SELECT", "T2.name", ",", "count", "(", "*", ")", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id" ]
[ "select", "t2", ".", "name", ",", "count", "(", "*", ")", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id" ]
[ "What", "are", "the", "names", "of", "high", "schoolers", "who", "have", "likes", ",", "and", "how", "many", "likes", "does", "each", "have", "?" ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
What is the name of the high schooler who has the greatest number of likes?
[ "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value"...
[ "What", "is", "the", "name", "of", "the", "high", "schooler", "who", "has", "the", "greatest", "number", "of", "likes", "?" ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
Give the name of the student with the most likes.
[ "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "order", "by", "count", "(", "*", ")", "desc", "limit", "value"...
[ "Give", "the", "name", "of", "the", "student", "with", "the", "most", "likes", "." ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2
Show the names of students who have at least 2 likes.
[ "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ]
[ "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "Show", "the", "names", "of", "students", "who", "have", "at", "least", "2", "likes", "." ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id HAVING count(*) >= 2
What are the names of students who have 2 or more likes?
[ "SELECT", "T2.name", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ]
[ "select", "t2", ".", "name", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "group", "by", "t1", ".", "student_id", "having", "count", "(", "*", ")", ">", "=", "value" ]
[ "What", "are", "the", "names", "of", "students", "who", "have", "2", "or", "more", "likes", "?" ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2
Show the names of students who have a grade higher than 5 and have at least 2 friends.
[ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.grade", ">", "5", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ]
[ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "grade", ">", "value", "group", "by", "t1", ".", "student_id", "having", "count", ...
[ "Show", "the", "names", "of", "students", "who", "have", "a", "grade", "higher", "than", "5", "and", "have", "at", "least", "2", "friends", "." ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2
What are the names of high schoolers who have a grade of over 5 and have 2 or more friends?
[ "SELECT", "T2.name", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.grade", ">", "5", "GROUP", "BY", "T1.student_id", "HAVING", "count", "(", "*", ")", ">", "=", "2" ]
[ "select", "t2", ".", "name", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "grade", ">", "value", "group", "by", "t1", ".", "student_id", "having", "count", ...
[ "What", "are", "the", "names", "of", "high", "schoolers", "who", "have", "a", "grade", "of", "over", "5", "and", "have", "2", "or", "more", "friends", "?" ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = "Kyle"
How many likes does Kyle have?
[ "SELECT", "count", "(", "*", ")", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ]
[ "select", "count", "(", "*", ")", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "name", "=", "value" ]
[ "How", "many", "likes", "does", "Kyle", "have", "?" ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT count(*) FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.name = "Kyle"
Return the number of likes that the high schooler named Kyle has.
[ "SELECT", "count", "(", "*", ")", "FROM", "Likes", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", "WHERE", "T2.name", "=", "``", "Kyle", "''" ]
[ "select", "count", "(", "*", ")", "from", "likes", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", "where", "t2", ".", "name", "=", "value" ]
[ "Return", "the", "number", "of", "likes", "that", "the", "high", "schooler", "named", "Kyle", "has", "." ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)
Find the average grade of all students who have some friends.
[ "SELECT", "avg", "(", "grade", ")", "FROM", "Highschooler", "WHERE", "id", "IN", "(", "SELECT", "T1.student_id", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", ")" ]
[ "select", "avg", "(", "grade", ")", "from", "highschooler", "where", "id", "in", "(", "select", "t1", ".", "student_id", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", ")" ]
[ "Find", "the", "average", "grade", "of", "all", "students", "who", "have", "some", "friends", "." ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)
What is the average grade of students who have friends?
[ "SELECT", "avg", "(", "grade", ")", "FROM", "Highschooler", "WHERE", "id", "IN", "(", "SELECT", "T1.student_id", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", ")" ]
[ "select", "avg", "(", "grade", ")", "from", "highschooler", "where", "id", "in", "(", "select", "t1", ".", "student_id", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", ")" ]
[ "What", "is", "the", "average", "grade", "of", "students", "who", "have", "friends", "?" ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)
Find the minimum grade of students who have no friends.
[ "SELECT", "min", "(", "grade", ")", "FROM", "Highschooler", "WHERE", "id", "NOT", "IN", "(", "SELECT", "T1.student_id", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", ")" ]
[ "select", "min", "(", "grade", ")", "from", "highschooler", "where", "id", "not", "in", "(", "select", "t1", ".", "student_id", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", ")" ]
[ "Find", "the", "minimum", "grade", "of", "students", "who", "have", "no", "friends", "." ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
network_1
SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)
What is the lowest grade of students who do not have any friends?
[ "SELECT", "min", "(", "grade", ")", "FROM", "Highschooler", "WHERE", "id", "NOT", "IN", "(", "SELECT", "T1.student_id", "FROM", "Friend", "AS", "T1", "JOIN", "Highschooler", "AS", "T2", "ON", "T1.student_id", "=", "T2.id", ")" ]
[ "select", "min", "(", "grade", ")", "from", "highschooler", "where", "id", "not", "in", "(", "select", "t1", ".", "student_id", "from", "friend", "as", "t1", "join", "highschooler", "as", "t2", "on", "t1", ".", "student_id", "=", "t2", ".", "id", ")" ]
[ "What", "is", "the", "lowest", "grade", "of", "students", "who", "do", "not", "have", "any", "friends", "?" ]
CREATE TABLE Highschooler ( ID NUMBER PRIMARY KEY, name TEXT, grade NUMBER ); CREATE TABLE Friend ( student_id NUMBER PRIMARY KEY, friend_id NUMBER, FOREIGN KEY (student_id) REFERENCES Highschooler(ID), FOREIGN KEY (friend_id) REFERENCES Highschooler(ID) ); CREATE TABLE Likes ( student_id NUMBER PRIMA...
dog_kennels
SELECT state FROM Owners INTERSECT SELECT state FROM Professionals
Which states have both owners and professionals living there?
[ "SELECT", "state", "FROM", "Owners", "INTERSECT", "SELECT", "state", "FROM", "Professionals" ]
[ "select", "state", "from", "owners", "intersect", "select", "state", "from", "professionals" ]
[ "Which", "states", "have", "both", "owners", "and", "professionals", "living", "there", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT state FROM Owners INTERSECT SELECT state FROM Professionals
Find the states where both owners and professionals live.
[ "SELECT", "state", "FROM", "Owners", "INTERSECT", "SELECT", "state", "FROM", "Professionals" ]
[ "select", "state", "from", "owners", "intersect", "select", "state", "from", "professionals" ]
[ "Find", "the", "states", "where", "both", "owners", "and", "professionals", "live", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )
What is the average age of the dogs who have gone through any treatments?
[ "SELECT", "avg", "(", "age", ")", "FROM", "Dogs", "WHERE", "dog_id", "IN", "(", "SELECT", "dog_id", "FROM", "Treatments", ")" ]
[ "select", "avg", "(", "age", ")", "from", "dogs", "where", "dog_id", "in", "(", "select", "dog_id", "from", "treatments", ")" ]
[ "What", "is", "the", "average", "age", "of", "the", "dogs", "who", "have", "gone", "through", "any", "treatments", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )
Find the average age of the dogs who went through treatments.
[ "SELECT", "avg", "(", "age", ")", "FROM", "Dogs", "WHERE", "dog_id", "IN", "(", "SELECT", "dog_id", "FROM", "Treatments", ")" ]
[ "select", "avg", "(", "age", ")", "from", "dogs", "where", "dog_id", "in", "(", "select", "dog_id", "from", "treatments", ")" ]
[ "Find", "the", "average", "age", "of", "the", "dogs", "who", "went", "through", "treatments", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2
Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone.
[ "SELECT", "professional_id", ",", "last_name", ",", "cell_number", "FROM", "Professionals", "WHERE", "state", "=", "'Indiana", "'", "UNION", "SELECT", "T1.professional_id", ",", "T1.last_name", ",", "T1.cell_number", "FROM", "Professionals", "AS", "T1", "JOIN", "Tre...
[ "select", "professional_id", ",", "last_name", ",", "cell_number", "from", "professionals", "where", "state", "=", "value", "union", "select", "t1", ".", "professional_id", ",", "t1", ".", "last_name", ",", "t1", ".", "cell_number", "from", "professionals", "as"...
[ "Which", "professionals", "live", "in", "the", "state", "of", "Indiana", "or", "have", "done", "treatment", "on", "more", "than", "2", "treatments", "?", "List", "his", "or", "her", "id", ",", "last", "name", "and", "cell", "phone", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2
Find the id, last name and cell phone of the professionals who live in the state of Indiana or have performed more than two treatments.
[ "SELECT", "professional_id", ",", "last_name", ",", "cell_number", "FROM", "Professionals", "WHERE", "state", "=", "'Indiana", "'", "UNION", "SELECT", "T1.professional_id", ",", "T1.last_name", ",", "T1.cell_number", "FROM", "Professionals", "AS", "T1", "JOIN", "Tre...
[ "select", "professional_id", ",", "last_name", ",", "cell_number", "from", "professionals", "where", "state", "=", "value", "union", "select", "t1", ".", "professional_id", ",", "t1", ".", "last_name", ",", "t1", ".", "cell_number", "from", "professionals", "as"...
[ "Find", "the", "id", ",", "last", "name", "and", "cell", "phone", "of", "the", "professionals", "who", "live", "in", "the", "state", "of", "Indiana", "or", "have", "performed", "more", "than", "two", "treatments", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment) > 1000 )
Which dogs have not cost their owner more than 1000 for treatment ? List the dog names .
[ "select", "name", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", "group", "by", "dog_id", "having", "sum", "(", "cost_of_treatment", ")", ">", "1000", ")" ]
[ "select", "name", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", "group", "by", "dog_id", "having", "sum", "(", "cost_of_treatment", ")", ">", "value", ")" ]
[ "Which", "dogs", "have", "not", "cost", "their", "owner", "more", "than", "1000", "for", "treatment", "?", "List", "the", "dog", "names", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment) > 1000 )
What are the names of the dogs for which the owner has not spend more than 1000 for treatment ?
[ "select", "name", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", "group", "by", "dog_id", "having", "sum", "(", "cost_of_treatment", ")", ">", "1000", ")" ]
[ "select", "name", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", "group", "by", "dog_id", "having", "sum", "(", "cost_of_treatment", ")", ">", "value", ")" ]
[ "What", "are", "the", "names", "of", "the", "dogs", "for", "which", "the", "owner", "has", "not", "spend", "more", "than", "1000", "for", "treatment", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs
Which first names are used for professionals or owners but are not used as dog names?
[ "SELECT", "first_name", "FROM", "Professionals", "UNION", "SELECT", "first_name", "FROM", "Owners", "EXCEPT", "SELECT", "name", "FROM", "Dogs" ]
[ "select", "first_name", "from", "professionals", "union", "select", "first_name", "from", "owners", "except", "select", "name", "from", "dogs" ]
[ "Which", "first", "names", "are", "used", "for", "professionals", "or", "owners", "but", "are", "not", "used", "as", "dog", "names", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT first_name FROM Professionals UNION SELECT first_name FROM Owners EXCEPT SELECT name FROM Dogs
Find the first names that are used for professionals or owners but are not used as dog names.
[ "SELECT", "first_name", "FROM", "Professionals", "UNION", "SELECT", "first_name", "FROM", "Owners", "EXCEPT", "SELECT", "name", "FROM", "Dogs" ]
[ "select", "first_name", "from", "professionals", "union", "select", "first_name", "from", "owners", "except", "select", "name", "from", "dogs" ]
[ "Find", "the", "first", "names", "that", "are", "used", "for", "professionals", "or", "owners", "but", "are", "not", "used", "as", "dog", "names", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id
Which professional did not operate any treatment on dogs? List the professional's id, role and email.
[ "SELECT", "professional_id", ",", "role_code", ",", "email_address", "FROM", "Professionals", "EXCEPT", "SELECT", "T1.professional_id", ",", "T1.role_code", ",", "T1.email_address", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.profe...
[ "select", "professional_id", ",", "role_code", ",", "email_address", "from", "professionals", "except", "select", "t1", ".", "professional_id", ",", "t1", ".", "role_code", ",", "t1", ".", "email_address", "from", "professionals", "as", "t1", "join", "treatments",...
[ "Which", "professional", "did", "not", "operate", "any", "treatment", "on", "dogs", "?", "List", "the", "professional", "'s", "id", ",", "role", "and", "email", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id
Give me the id, role and email of the professionals who did not perform any treatment on dogs.
[ "SELECT", "professional_id", ",", "role_code", ",", "email_address", "FROM", "Professionals", "EXCEPT", "SELECT", "T1.professional_id", ",", "T1.role_code", ",", "T1.email_address", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.profe...
[ "select", "professional_id", ",", "role_code", ",", "email_address", "from", "professionals", "except", "select", "t1", ".", "professional_id", ",", "t1", ".", "role_code", ",", "t1", ".", "email_address", "from", "professionals", "as", "t1", "join", "treatments",...
[ "Give", "me", "the", "id", ",", "role", "and", "email", "of", "the", "professionals", "who", "did", "not", "perform", "any", "treatment", "on", "dogs", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1
Which owner owns the most dogs? List the owner id, first name and last name.
[ "SELECT", "T1.owner_id", ",", "T2.first_name", ",", "T2.last_name", "FROM", "Dogs", "AS", "T1", "JOIN", "Owners", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "owner_id", ",", "t2", ".", "first_name", ",", "t2", ".", "last_name", "from", "dogs", "as", "t1", "join", "owners", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "group", "by", "t1", ".", "owner_id", "orde...
[ "Which", "owner", "owns", "the", "most", "dogs", "?", "List", "the", "owner", "id", ",", "first", "name", "and", "last", "name", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1
Return the owner id, first name and last name of the owner who has the most dogs.
[ "SELECT", "T1.owner_id", ",", "T2.first_name", ",", "T2.last_name", "FROM", "Dogs", "AS", "T1", "JOIN", "Owners", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "owner_id", ",", "t2", ".", "first_name", ",", "t2", ".", "last_name", "from", "dogs", "as", "t1", "join", "owners", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "group", "by", "t1", ".", "owner_id", "orde...
[ "Return", "the", "owner", "id", ",", "first", "name", "and", "last", "name", "of", "the", "owner", "who", "has", "the", "most", "dogs", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2
Which professionals have done at least two treatments? List the professional's id, role, and first name.
[ "SELECT", "T1.professional_id", ",", "T1.role_code", ",", "T1.first_name", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ...
[ "select", "t1", ".", "professional_id", ",", "t1", ".", "role_code", ",", "t1", ".", "first_name", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", ...
[ "Which", "professionals", "have", "done", "at", "least", "two", "treatments", "?", "List", "the", "professional", "'s", "id", ",", "role", ",", "and", "first", "name", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2
What are the id, role, and first name of the professionals who have performed two or more treatments?
[ "SELECT", "T1.professional_id", ",", "T1.role_code", ",", "T1.first_name", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ...
[ "select", "t1", ".", "professional_id", ",", "t1", ".", "role_code", ",", "t1", ".", "first_name", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", ...
[ "What", "are", "the", "id", ",", "role", ",", "and", "first", "name", "of", "the", "professionals", "who", "have", "performed", "two", "or", "more", "treatments", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1
What is the name of the breed with the most dogs?
[ "SELECT", "T1.breed_name", "FROM", "Breeds", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.breed_code", "=", "T2.breed_code", "GROUP", "BY", "T1.breed_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "breed_name", "from", "breeds", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "breed_code", "=", "t2", ".", "breed_code", "group", "by", "t1", ".", "breed_name", "order", "by", "count", "(", "*", ")", "desc", "limit", ...
[ "What", "is", "the", "name", "of", "the", "breed", "with", "the", "most", "dogs", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1
Which breed do the most dogs have? Give me the breed name.
[ "SELECT", "T1.breed_name", "FROM", "Breeds", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.breed_code", "=", "T2.breed_code", "GROUP", "BY", "T1.breed_name", "ORDER", "BY", "count", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "t1", ".", "breed_name", "from", "breeds", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "breed_code", "=", "t2", ".", "breed_code", "group", "by", "t1", ".", "breed_name", "order", "by", "count", "(", "*", ")", "desc", "limit", ...
[ "Which", "breed", "do", "the", "most", "dogs", "have", "?", "Give", "me", "the", "breed", "name", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1
Which owner has paid for the most treatments on his or her dogs? List the owner id and last name.
[ "SELECT", "T1.owner_id", ",", "T1.last_name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "JOIN", "Treatments", "AS", "T3", "ON", "T2.dog_id", "=", "T3.dog_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY",...
[ "select", "t1", ".", "owner_id", ",", "t1", ".", "last_name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "join", "treatments", "as", "t3", "on", "t2", ".", "dog_id", "=", "t3", ...
[ "Which", "owner", "has", "paid", "for", "the", "most", "treatments", "on", "his", "or", "her", "dogs", "?", "List", "the", "owner", "id", "and", "last", "name", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.owner_id , T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1
Tell me the owner id and last name of the owner who spent the most on treatments of his or her dogs.
[ "SELECT", "T1.owner_id", ",", "T1.last_name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "JOIN", "Treatments", "AS", "T3", "ON", "T2.dog_id", "=", "T3.dog_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY",...
[ "select", "t1", ".", "owner_id", ",", "t1", ".", "last_name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "join", "treatments", "as", "t3", "on", "t2", ".", "dog_id", "=", "t3", ...
[ "Tell", "me", "the", "owner", "id", "and", "last", "name", "of", "the", "owner", "who", "spent", "the", "most", "on", "treatments", "of", "his", "or", "her", "dogs", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1
What is the description of the treatment type that costs the least money in total?
[ "SELECT", "T1.treatment_type_description", "FROM", "Treatment_types", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.treatment_type_code", "=", "T2.treatment_type_code", "GROUP", "BY", "T1.treatment_type_code", "ORDER", "BY", "sum", "(", "cost_of_treatment", ")",...
[ "select", "t1", ".", "treatment_type_description", "from", "treatment_types", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "treatment_type_code", "=", "t2", ".", "treatment_type_code", "group", "by", "t1", ".", "treatment_type_code", "order", "by...
[ "What", "is", "the", "description", "of", "the", "treatment", "type", "that", "costs", "the", "least", "money", "in", "total", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY sum(cost_of_treatment) ASC LIMIT 1
Give me the description of the treatment type whose total cost is the lowest.
[ "SELECT", "T1.treatment_type_description", "FROM", "Treatment_types", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.treatment_type_code", "=", "T2.treatment_type_code", "GROUP", "BY", "T1.treatment_type_code", "ORDER", "BY", "sum", "(", "cost_of_treatment", ")",...
[ "select", "t1", ".", "treatment_type_description", "from", "treatment_types", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "treatment_type_code", "=", "t2", ".", "treatment_type_code", "group", "by", "t1", ".", "treatment_type_code", "order", "by...
[ "Give", "me", "the", "description", "of", "the", "treatment", "type", "whose", "total", "cost", "is", "the", "lowest", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1
Which owner has paid the largest amount of money in total for their dogs? Show the owner id and zip code.
[ "SELECT", "T1.owner_id", ",", "T1.zip_code", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "JOIN", "Treatments", "AS", "T3", "ON", "T2.dog_id", "=", "T3.dog_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", ...
[ "select", "t1", ".", "owner_id", ",", "t1", ".", "zip_code", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "join", "treatments", "as", "t3", "on", "t2", ".", "dog_id", "=", "t3", ...
[ "Which", "owner", "has", "paid", "the", "largest", "amount", "of", "money", "in", "total", "for", "their", "dogs", "?", "Show", "the", "owner", "id", "and", "zip", "code", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.owner_id , T1.zip_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id JOIN Treatments AS T3 ON T2.dog_id = T3.dog_id GROUP BY T1.owner_id ORDER BY sum(T3.cost_of_treatment) DESC LIMIT 1
Find the owner id and zip code of the owner who spent the most money in total for his or her dogs.
[ "SELECT", "T1.owner_id", ",", "T1.zip_code", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "JOIN", "Treatments", "AS", "T3", "ON", "T2.dog_id", "=", "T3.dog_id", "GROUP", "BY", "T1.owner_id", "ORDER", "BY", ...
[ "select", "t1", ".", "owner_id", ",", "t1", ".", "zip_code", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "join", "treatments", "as", "t3", "on", "t2", ".", "dog_id", "=", "t3", ...
[ "Find", "the", "owner", "id", "and", "zip", "code", "of", "the", "owner", "who", "spent", "the", "most", "money", "in", "total", "for", "his", "or", "her", "dogs", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.professional_id , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2
Which professionals have done at least two types of treatments? List the professional id and cell phone.
[ "SELECT", "T1.professional_id", ",", "T1.cell_number", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "=", "2...
[ "select", "t1", ".", "professional_id", ",", "t1", ".", "cell_number", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", ...
[ "Which", "professionals", "have", "done", "at", "least", "two", "types", "of", "treatments", "?", "List", "the", "professional", "id", "and", "cell", "phone", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.professional_id , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2
Find the id and cell phone of the professionals who operate two or more types of treatments.
[ "SELECT", "T1.professional_id", ",", "T1.cell_number", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "GROUP", "BY", "T1.professional_id", "HAVING", "count", "(", "*", ")", ">", "=", "2...
[ "select", "t1", ".", "professional_id", ",", "t1", ".", "cell_number", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "group", "by", "t1", ".", "professional_id", ...
[ "Find", "the", "id", "and", "cell", "phone", "of", "the", "professionals", "who", "operate", "two", "or", "more", "types", "of", "treatments", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )
What are the first name and last name of the professionals who have done treatment with cost below average?
[ "SELECT", "DISTINCT", "T1.first_name", ",", "T1.last_name", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "WHERE", "cost_of_treatment", "<", "(", "SELECT", "avg", "(", "cost_of_treatment", ")", "FROM", "Treatments", ")" ]
[ "select", "distinct", "t1", ".", "first_name", ",", "t1", ".", "last_name", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "where", "cost_of_treatment", "<", "(", "select", "avg", "(", "cost_of_treatment", ")", "from", "treatments", ")"...
[ "What", "are", "the", "first", "name", "and", "last", "name", "of", "the", "professionals", "who", "have", "done", "treatment", "with", "cost", "below", "average", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT DISTINCT T1.first_name , T1.last_name FROM Professionals AS T1 JOIN Treatments AS T2 WHERE cost_of_treatment < ( SELECT avg(cost_of_treatment) FROM Treatments )
Which professionals have operated a treatment that costs less than the average? Give me theor first names and last names.
[ "SELECT", "DISTINCT", "T1.first_name", ",", "T1.last_name", "FROM", "Professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "WHERE", "cost_of_treatment", "<", "(", "SELECT", "avg", "(", "cost_of_treatment", ")", "FROM", "Treatments", ")" ]
[ "select", "distinct", "t1", ".", "first_name", ",", "t1", ".", "last_name", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "where", "cost_of_treatment", "<", "(", "select", "avg", "(", "cost_of_treatment", ")", "from", "treatments", ")"...
[ "Which", "professionals", "have", "operated", "a", "treatment", "that", "costs", "less", "than", "the", "average", "?", "Give", "me", "theor", "first", "names", "and", "last", "names", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id
List the date of each treatment, together with the first name of the professional who operated it.
[ "SELECT", "T1.date_of_treatment", ",", "T2.first_name", "FROM", "Treatments", "AS", "T1", "JOIN", "Professionals", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id" ]
[ "select", "t1", ".", "date_of_treatment", ",", "t2", ".", "first_name", "from", "treatments", "as", "t1", "join", "professionals", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id" ]
[ "List", "the", "date", "of", "each", "treatment", ",", "together", "with", "the", "first", "name", "of", "the", "professional", "who", "operated", "it", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id
What are the date and the operating professional's first name of each treatment?
[ "SELECT", "T1.date_of_treatment", ",", "T2.first_name", "FROM", "Treatments", "AS", "T1", "JOIN", "Professionals", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id" ]
[ "select", "t1", ".", "date_of_treatment", ",", "t2", ".", "first_name", "from", "treatments", "as", "t1", "join", "professionals", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id" ]
[ "What", "are", "the", "date", "and", "the", "operating", "professional", "'s", "first", "name", "of", "each", "treatment", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code
List the cost of each treatment and the corresponding treatment type description.
[ "SELECT", "T1.cost_of_treatment", ",", "T2.treatment_type_description", "FROM", "Treatments", "AS", "T1", "JOIN", "treatment_types", "AS", "T2", "ON", "T1.treatment_type_code", "=", "T2.treatment_type_code" ]
[ "select", "t1", ".", "cost_of_treatment", ",", "t2", ".", "treatment_type_description", "from", "treatments", "as", "t1", "join", "treatment_types", "as", "t2", "on", "t1", ".", "treatment_type_code", "=", "t2", ".", "treatment_type_code" ]
[ "List", "the", "cost", "of", "each", "treatment", "and", "the", "corresponding", "treatment", "type", "description", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.cost_of_treatment , T2.treatment_type_description FROM Treatments AS T1 JOIN treatment_types AS T2 ON T1.treatment_type_code = T2.treatment_type_code
What are the cost and treatment type description of each treatment?
[ "SELECT", "T1.cost_of_treatment", ",", "T2.treatment_type_description", "FROM", "Treatments", "AS", "T1", "JOIN", "treatment_types", "AS", "T2", "ON", "T1.treatment_type_code", "=", "T2.treatment_type_code" ]
[ "select", "t1", ".", "cost_of_treatment", ",", "t2", ".", "treatment_type_description", "from", "treatments", "as", "t1", "join", "treatment_types", "as", "t2", "on", "t1", ".", "treatment_type_code", "=", "t2", ".", "treatment_type_code" ]
[ "What", "are", "the", "cost", "and", "treatment", "type", "description", "of", "each", "treatment", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id
List each owner's first name, last name, and the size of his for her dog.
[ "SELECT", "T1.first_name", ",", "T1.last_name", ",", "T2.size_code", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id" ]
[ "select", "t1", ".", "first_name", ",", "t1", ".", "last_name", ",", "t2", ".", "size_code", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id" ]
[ "List", "each", "owner", "'s", "first", "name", ",", "last", "name", ",", "and", "the", "size", "of", "his", "for", "her", "dog", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.first_name , T1.last_name , T2.size_code FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id
What are each owner's first name, last name, and the size of their dog?
[ "SELECT", "T1.first_name", ",", "T1.last_name", ",", "T2.size_code", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id" ]
[ "select", "t1", ".", "first_name", ",", "t1", ".", "last_name", ",", "t2", ".", "size_code", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id" ]
[ "What", "are", "each", "owner", "'s", "first", "name", ",", "last", "name", ",", "and", "the", "size", "of", "their", "dog", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id
List pairs of the owner's first name and the dogs's name.
[ "SELECT", "T1.first_name", ",", "T2.name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id" ]
[ "select", "t1", ".", "first_name", ",", "t2", ".", "name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id" ]
[ "List", "pairs", "of", "the", "owner", "'s", "first", "name", "and", "the", "dogs", "'s", "name", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id
What are each owner's first name and their dogs's name?
[ "SELECT", "T1.first_name", ",", "T2.name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id" ]
[ "select", "t1", ".", "first_name", ",", "t2", ".", "name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id" ]
[ "What", "are", "each", "owner", "'s", "first", "name", "and", "their", "dogs", "'s", "name", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )
List the names of the dogs of the rarest breed and the treatment dates of them.
[ "SELECT", "T1.name", ",", "T2.date_of_treatment", "FROM", "Dogs", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.dog_id", "=", "T2.dog_id", "WHERE", "T1.breed_code", "=", "(", "SELECT", "breed_code", "FROM", "Dogs", "GROUP", "BY", "breed_code", "ORDER",...
[ "select", "t1", ".", "name", ",", "t2", ".", "date_of_treatment", "from", "dogs", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "dog_id", "=", "t2", ".", "dog_id", "where", "t1", ".", "breed_code", "=", "(", "select", "breed_code", "fr...
[ "List", "the", "names", "of", "the", "dogs", "of", "the", "rarest", "breed", "and", "the", "treatment", "dates", "of", "them", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 )
Which dogs are of the rarest breed? Show their names and treatment dates.
[ "SELECT", "T1.name", ",", "T2.date_of_treatment", "FROM", "Dogs", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.dog_id", "=", "T2.dog_id", "WHERE", "T1.breed_code", "=", "(", "SELECT", "breed_code", "FROM", "Dogs", "GROUP", "BY", "breed_code", "ORDER",...
[ "select", "t1", ".", "name", ",", "t2", ".", "date_of_treatment", "from", "dogs", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "dog_id", "=", "t2", ".", "dog_id", "where", "t1", ".", "breed_code", "=", "(", "select", "breed_code", "fr...
[ "Which", "dogs", "are", "of", "the", "rarest", "breed", "?", "Show", "their", "names", "and", "treatment", "dates", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia'
Which dogs are owned by someone who lives in Virginia? List the owner's first name and the dog's name.
[ "SELECT", "T1.first_name", ",", "T2.name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "WHERE", "T1.state", "=", "'Virginia", "'" ]
[ "select", "t1", ".", "first_name", ",", "t2", ".", "name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "where", "t1", ".", "state", "=", "value" ]
[ "Which", "dogs", "are", "owned", "by", "someone", "who", "lives", "in", "Virginia", "?", "List", "the", "owner", "'s", "first", "name", "and", "the", "dog", "'s", "name", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.first_name , T2.name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T1.state = 'Virginia'
Find the first names of owners living in Virginia and the names of dogs they own.
[ "SELECT", "T1.first_name", ",", "T2.name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "WHERE", "T1.state", "=", "'Virginia", "'" ]
[ "select", "t1", ".", "first_name", ",", "t2", ".", "name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "where", "t1", ".", "state", "=", "value" ]
[ "Find", "the", "first", "names", "of", "owners", "living", "in", "Virginia", "and", "the", "names", "of", "dogs", "they", "own", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT DISTINCT T1.date_arrived , T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id
What are the arriving date and the departing date of the dogs who have gone through a treatment?
[ "SELECT", "DISTINCT", "T1.date_arrived", ",", "T1.date_departed", "FROM", "Dogs", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.dog_id", "=", "T2.dog_id" ]
[ "select", "distinct", "t1", ".", "date_arrived", ",", "t1", ".", "date_departed", "from", "dogs", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "dog_id", "=", "t2", ".", "dog_id" ]
[ "What", "are", "the", "arriving", "date", "and", "the", "departing", "date", "of", "the", "dogs", "who", "have", "gone", "through", "a", "treatment", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT DISTINCT T1.date_arrived , T1.date_departed FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id
Find the arriving date and the departing date of the dogs that received a treatment.
[ "SELECT", "DISTINCT", "T1.date_arrived", ",", "T1.date_departed", "FROM", "Dogs", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.dog_id", "=", "T2.dog_id" ]
[ "select", "distinct", "t1", ".", "date_arrived", ",", "t1", ".", "date_departed", "from", "dogs", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "dog_id", "=", "t2", ".", "dog_id" ]
[ "Find", "the", "arriving", "date", "and", "the", "departing", "date", "of", "the", "dogs", "that", "received", "a", "treatment", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT max(age) FROM Dogs )
List the last name of the owner owning the youngest dog.
[ "SELECT", "T1.last_name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "WHERE", "T2.age", "=", "(", "SELECT", "max", "(", "age", ")", "FROM", "Dogs", ")" ]
[ "select", "t1", ".", "last_name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "where", "t2", ".", "age", "=", "(", "select", "max", "(", "age", ")", "from", "dogs", ")" ]
[ "List", "the", "last", "name", "of", "the", "owner", "owning", "the", "youngest", "dog", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT max(age) FROM Dogs )
Who owns the youngest dog? Give me his or her last name.
[ "SELECT", "T1.last_name", "FROM", "Owners", "AS", "T1", "JOIN", "Dogs", "AS", "T2", "ON", "T1.owner_id", "=", "T2.owner_id", "WHERE", "T2.age", "=", "(", "SELECT", "max", "(", "age", ")", "FROM", "Dogs", ")" ]
[ "select", "t1", ".", "last_name", "from", "owners", "as", "t1", "join", "dogs", "as", "t2", "on", "t1", ".", "owner_id", "=", "t2", ".", "owner_id", "where", "t2", ".", "age", "=", "(", "select", "max", "(", "age", ")", "from", "dogs", ")" ]
[ "Who", "owns", "the", "youngest", "dog", "?", "Give", "me", "his", "or", "her", "last", "name", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'
List the emails of the professionals who live in the state of Hawaii or the state of Wisconsin.
[ "SELECT", "email_address", "FROM", "Professionals", "WHERE", "state", "=", "'Hawaii", "'", "OR", "state", "=", "'Wisconsin", "'" ]
[ "select", "email_address", "from", "professionals", "where", "state", "=", "value", "or", "state", "=", "value" ]
[ "List", "the", "emails", "of", "the", "professionals", "who", "live", "in", "the", "state", "of", "Hawaii", "or", "the", "state", "of", "Wisconsin", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT email_address FROM Professionals WHERE state = 'Hawaii' OR state = 'Wisconsin'
What are the emails of the professionals living in either the state of Hawaii or the state of Wisconsin?
[ "SELECT", "email_address", "FROM", "Professionals", "WHERE", "state", "=", "'Hawaii", "'", "OR", "state", "=", "'Wisconsin", "'" ]
[ "select", "email_address", "from", "professionals", "where", "state", "=", "value", "or", "state", "=", "value" ]
[ "What", "are", "the", "emails", "of", "the", "professionals", "living", "in", "either", "the", "state", "of", "Hawaii", "or", "the", "state", "of", "Wisconsin", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT date_arrived , date_departed FROM Dogs
What are the arriving date and the departing date of all the dogs?
[ "SELECT", "date_arrived", ",", "date_departed", "FROM", "Dogs" ]
[ "select", "date_arrived", ",", "date_departed", "from", "dogs" ]
[ "What", "are", "the", "arriving", "date", "and", "the", "departing", "date", "of", "all", "the", "dogs", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT date_arrived , date_departed FROM Dogs
List the arrival date and the departure date for all the dogs.
[ "SELECT", "date_arrived", ",", "date_departed", "FROM", "Dogs" ]
[ "select", "date_arrived", ",", "date_departed", "from", "dogs" ]
[ "List", "the", "arrival", "date", "and", "the", "departure", "date", "for", "all", "the", "dogs", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT count(DISTINCT dog_id) FROM Treatments
How many dogs went through any treatments?
[ "SELECT", "count", "(", "DISTINCT", "dog_id", ")", "FROM", "Treatments" ]
[ "select", "count", "(", "distinct", "dog_id", ")", "from", "treatments" ]
[ "How", "many", "dogs", "went", "through", "any", "treatments", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT count(DISTINCT dog_id) FROM Treatments
Count the number of dogs that went through a treatment.
[ "SELECT", "count", "(", "DISTINCT", "dog_id", ")", "FROM", "Treatments" ]
[ "select", "count", "(", "distinct", "dog_id", ")", "from", "treatments" ]
[ "Count", "the", "number", "of", "dogs", "that", "went", "through", "a", "treatment", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT count(DISTINCT professional_id) FROM Treatments
How many professionals have performed any treatment to dogs?
[ "SELECT", "count", "(", "DISTINCT", "professional_id", ")", "FROM", "Treatments" ]
[ "select", "count", "(", "distinct", "professional_id", ")", "from", "treatments" ]
[ "How", "many", "professionals", "have", "performed", "any", "treatment", "to", "dogs", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT count(DISTINCT professional_id) FROM Treatments
Find the number of professionals who have ever treated dogs.
[ "SELECT", "count", "(", "DISTINCT", "professional_id", ")", "FROM", "Treatments" ]
[ "select", "count", "(", "distinct", "professional_id", ")", "from", "treatments" ]
[ "Find", "the", "number", "of", "professionals", "who", "have", "ever", "treated", "dogs", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'
Which professionals live in a city containing the substring 'West'? List his or her role, street, city and state.
[ "SELECT", "role_code", ",", "street", ",", "city", ",", "state", "FROM", "professionals", "WHERE", "city", "LIKE", "'", "%", "West", "%", "'" ]
[ "select", "role_code", ",", "street", ",", "city", ",", "state", "from", "professionals", "where", "city", "like", "value" ]
[ "Which", "professionals", "live", "in", "a", "city", "containing", "the", "substring", "'West", "'", "?", "List", "his", "or", "her", "role", ",", "street", ",", "city", "and", "state", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT role_code , street , city , state FROM professionals WHERE city LIKE '%West%'
Find the role, street, city and state of the professionals living in a city that contains the substring 'West'.
[ "SELECT", "role_code", ",", "street", ",", "city", ",", "state", "FROM", "professionals", "WHERE", "city", "LIKE", "'", "%", "West", "%", "'" ]
[ "select", "role_code", ",", "street", ",", "city", ",", "state", "from", "professionals", "where", "city", "like", "value" ]
[ "Find", "the", "role", ",", "street", ",", "city", "and", "state", "of", "the", "professionals", "living", "in", "a", "city", "that", "contains", "the", "substring", "'West", "'", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'
Which owners live in the state whose name contains the substring 'North'? List his first name, last name and email.
[ "SELECT", "first_name", ",", "last_name", ",", "email_address", "FROM", "Owners", "WHERE", "state", "LIKE", "'", "%", "North", "%", "'" ]
[ "select", "first_name", ",", "last_name", ",", "email_address", "from", "owners", "where", "state", "like", "value" ]
[ "Which", "owners", "live", "in", "the", "state", "whose", "name", "contains", "the", "substring", "'North", "'", "?", "List", "his", "first", "name", ",", "last", "name", "and", "email", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%'
Return the first name, last name and email of the owners living in a state whose name contains the substring 'North'.
[ "SELECT", "first_name", ",", "last_name", ",", "email_address", "FROM", "Owners", "WHERE", "state", "LIKE", "'", "%", "North", "%", "'" ]
[ "select", "first_name", ",", "last_name", ",", "email_address", "from", "owners", "where", "state", "like", "value" ]
[ "Return", "the", "first", "name", ",", "last", "name", "and", "email", "of", "the", "owners", "living", "in", "a", "state", "whose", "name", "contains", "the", "substring", "'North", "'", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )
How many dogs have an age below the average?
[ "SELECT", "count", "(", "*", ")", "FROM", "Dogs", "WHERE", "age", "<", "(", "SELECT", "avg", "(", "age", ")", "FROM", "Dogs", ")" ]
[ "select", "count", "(", "*", ")", "from", "dogs", "where", "age", "<", "(", "select", "avg", "(", "age", ")", "from", "dogs", ")" ]
[ "How", "many", "dogs", "have", "an", "age", "below", "the", "average", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs )
Count the number of dogs of an age below the average.
[ "SELECT", "count", "(", "*", ")", "FROM", "Dogs", "WHERE", "age", "<", "(", "SELECT", "avg", "(", "age", ")", "FROM", "Dogs", ")" ]
[ "select", "count", "(", "*", ")", "from", "dogs", "where", "age", "<", "(", "select", "avg", "(", "age", ")", "from", "dogs", ")" ]
[ "Count", "the", "number", "of", "dogs", "of", "an", "age", "below", "the", "average", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1
How much does the most recent treatment cost?
[ "SELECT", "cost_of_treatment", "FROM", "Treatments", "ORDER", "BY", "date_of_treatment", "DESC", "LIMIT", "1" ]
[ "select", "cost_of_treatment", "from", "treatments", "order", "by", "date_of_treatment", "desc", "limit", "value" ]
[ "How", "much", "does", "the", "most", "recent", "treatment", "cost", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1
Show me the cost of the most recently performed treatment.
[ "SELECT", "cost_of_treatment", "FROM", "Treatments", "ORDER", "BY", "date_of_treatment", "DESC", "LIMIT", "1" ]
[ "select", "cost_of_treatment", "from", "treatments", "order", "by", "date_of_treatment", "desc", "limit", "value" ]
[ "Show", "me", "the", "cost", "of", "the", "most", "recently", "performed", "treatment", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT count(*) FROM Dogs WHERE dog_id NOT IN ( SELECT dog_id FROM Treatments )
How many dogs have not gone through any treatment?
[ "SELECT", "count", "(", "*", ")", "FROM", "Dogs", "WHERE", "dog_id", "NOT", "IN", "(", "SELECT", "dog_id", "FROM", "Treatments", ")" ]
[ "select", "count", "(", "*", ")", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", ")" ]
[ "How", "many", "dogs", "have", "not", "gone", "through", "any", "treatment", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
select count(*) from dogs where dog_id not in ( select dog_id from treatments )
Tell me the number of dogs that have not received any treatment .
[ "select", "count", "(", "*", ")", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", ")" ]
[ "select", "count", "(", "*", ")", "from", "dogs", "where", "dog_id", "not", "in", "(", "select", "dog_id", "from", "treatments", ")" ]
[ "Tell", "me", "the", "number", "of", "dogs", "that", "have", "not", "received", "any", "treatment", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )
How many owners temporarily do not have any dogs?
[ "SELECT", "count", "(", "*", ")", "FROM", "Owners", "WHERE", "owner_id", "NOT", "IN", "(", "SELECT", "owner_id", "FROM", "Dogs", ")" ]
[ "select", "count", "(", "*", ")", "from", "owners", "where", "owner_id", "not", "in", "(", "select", "owner_id", "from", "dogs", ")" ]
[ "How", "many", "owners", "temporarily", "do", "not", "have", "any", "dogs", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT count(*) FROM Owners WHERE owner_id NOT IN ( SELECT owner_id FROM Dogs )
Find the number of owners who do not own any dogs at this moment.
[ "SELECT", "count", "(", "*", ")", "FROM", "Owners", "WHERE", "owner_id", "NOT", "IN", "(", "SELECT", "owner_id", "FROM", "Dogs", ")" ]
[ "select", "count", "(", "*", ")", "from", "owners", "where", "owner_id", "not", "in", "(", "select", "owner_id", "from", "dogs", ")" ]
[ "Find", "the", "number", "of", "owners", "who", "do", "not", "own", "any", "dogs", "at", "this", "moment", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )
How many professionals did not operate any treatment on dogs?
[ "SELECT", "count", "(", "*", ")", "FROM", "Professionals", "WHERE", "professional_id", "NOT", "IN", "(", "SELECT", "professional_id", "FROM", "Treatments", ")" ]
[ "select", "count", "(", "*", ")", "from", "professionals", "where", "professional_id", "not", "in", "(", "select", "professional_id", "from", "treatments", ")" ]
[ "How", "many", "professionals", "did", "not", "operate", "any", "treatment", "on", "dogs", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT count(*) FROM Professionals WHERE professional_id NOT IN ( SELECT professional_id FROM Treatments )
Find the number of professionals who have not treated any dogs.
[ "SELECT", "count", "(", "*", ")", "FROM", "Professionals", "WHERE", "professional_id", "NOT", "IN", "(", "SELECT", "professional_id", "FROM", "Treatments", ")" ]
[ "select", "count", "(", "*", ")", "from", "professionals", "where", "professional_id", "not", "in", "(", "select", "professional_id", "from", "treatments", ")" ]
[ "Find", "the", "number", "of", "professionals", "who", "have", "not", "treated", "any", "dogs", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1
List the dog name, age and weight of the dogs who have been abandoned? 1 stands for yes, and 0 stands for no.
[ "SELECT", "name", ",", "age", ",", "weight", "FROM", "Dogs", "WHERE", "abandoned_yn", "=", "1" ]
[ "select", "name", ",", "age", ",", "weight", "from", "dogs", "where", "abandoned_yn", "=", "value" ]
[ "List", "the", "dog", "name", ",", "age", "and", "weight", "of", "the", "dogs", "who", "have", "been", "abandoned", "?", "1", "stands", "for", "yes", ",", "and", "0", "stands", "for", "no", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT name , age , weight FROM Dogs WHERE abandoned_yn = 1
What are the dog name, age and weight of the dogs that were abandoned? Note that 1 stands for yes, and 0 stands for no in the tables.
[ "SELECT", "name", ",", "age", ",", "weight", "FROM", "Dogs", "WHERE", "abandoned_yn", "=", "1" ]
[ "select", "name", ",", "age", ",", "weight", "from", "dogs", "where", "abandoned_yn", "=", "value" ]
[ "What", "are", "the", "dog", "name", ",", "age", "and", "weight", "of", "the", "dogs", "that", "were", "abandoned", "?", "Note", "that", "1", "stands", "for", "yes", ",", "and", "0", "stands", "for", "no", "in", "the", "tables", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT avg(age) FROM Dogs
What is the average age of all the dogs?
[ "SELECT", "avg", "(", "age", ")", "FROM", "Dogs" ]
[ "select", "avg", "(", "age", ")", "from", "dogs" ]
[ "What", "is", "the", "average", "age", "of", "all", "the", "dogs", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT avg(age) FROM Dogs
Compute the average age of all the dogs.
[ "SELECT", "avg", "(", "age", ")", "FROM", "Dogs" ]
[ "select", "avg", "(", "age", ")", "from", "dogs" ]
[ "Compute", "the", "average", "age", "of", "all", "the", "dogs", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT max(age) FROM Dogs
What is the age of the oldest dog?
[ "SELECT", "max", "(", "age", ")", "FROM", "Dogs" ]
[ "select", "max", "(", "age", ")", "from", "dogs" ]
[ "What", "is", "the", "age", "of", "the", "oldest", "dog", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT max(age) FROM Dogs
Tell me the age of the oldest dog.
[ "SELECT", "max", "(", "age", ")", "FROM", "Dogs" ]
[ "select", "max", "(", "age", ")", "from", "dogs" ]
[ "Tell", "me", "the", "age", "of", "the", "oldest", "dog", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT charge_type , charge_amount FROM Charges
How much does each charge type costs? List both charge type and amount.
[ "SELECT", "charge_type", ",", "charge_amount", "FROM", "Charges" ]
[ "select", "charge_type", ",", "charge_amount", "from", "charges" ]
[ "How", "much", "does", "each", "charge", "type", "costs", "?", "List", "both", "charge", "type", "and", "amount", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT charge_type , charge_amount FROM Charges
List each charge type and its amount.
[ "SELECT", "charge_type", ",", "charge_amount", "FROM", "Charges" ]
[ "select", "charge_type", ",", "charge_amount", "from", "charges" ]
[ "List", "each", "charge", "type", "and", "its", "amount", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT max(charge_amount) FROM Charges
How much does the most expensive charge type costs?
[ "SELECT", "max", "(", "charge_amount", ")", "FROM", "Charges" ]
[ "select", "max", "(", "charge_amount", ")", "from", "charges" ]
[ "How", "much", "does", "the", "most", "expensive", "charge", "type", "costs", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT max(charge_amount) FROM Charges
What is the charge amount of the most expensive charge type?
[ "SELECT", "max", "(", "charge_amount", ")", "FROM", "Charges" ]
[ "select", "max", "(", "charge_amount", ")", "from", "charges" ]
[ "What", "is", "the", "charge", "amount", "of", "the", "most", "expensive", "charge", "type", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT email_address , cell_number , home_phone FROM professionals
List the email, cell phone and home phone of all the professionals.
[ "SELECT", "email_address", ",", "cell_number", ",", "home_phone", "FROM", "professionals" ]
[ "select", "email_address", ",", "cell_number", ",", "home_phone", "from", "professionals" ]
[ "List", "the", "email", ",", "cell", "phone", "and", "home", "phone", "of", "all", "the", "professionals", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT email_address , cell_number , home_phone FROM professionals
What are the email, cell phone and home phone of each professional?
[ "SELECT", "email_address", ",", "cell_number", ",", "home_phone", "FROM", "professionals" ]
[ "select", "email_address", ",", "cell_number", ",", "home_phone", "from", "professionals" ]
[ "What", "are", "the", "email", ",", "cell", "phone", "and", "home", "phone", "of", "each", "professional", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT DISTINCT breed_code , size_code FROM dogs
What are all the possible breed type and size type combinations?
[ "SELECT", "DISTINCT", "breed_code", ",", "size_code", "FROM", "dogs" ]
[ "select", "distinct", "breed_code", ",", "size_code", "from", "dogs" ]
[ "What", "are", "all", "the", "possible", "breed", "type", "and", "size", "type", "combinations", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT DISTINCT breed_code , size_code FROM dogs
Find the distinct breed type and size type combinations for dogs.
[ "SELECT", "DISTINCT", "breed_code", ",", "size_code", "FROM", "dogs" ]
[ "select", "distinct", "breed_code", ",", "size_code", "from", "dogs" ]
[ "Find", "the", "distinct", "breed", "type", "and", "size", "type", "combinations", "for", "dogs", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code
List the first name of all the professionals along with the description of the treatment they have done.
[ "SELECT", "DISTINCT", "T1.first_name", ",", "T3.treatment_type_description", "FROM", "professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "JOIN", "Treatment_types", "AS", "T3", "ON", "T2.treatment_type_code"...
[ "select", "distinct", "t1", ".", "first_name", ",", "t3", ".", "treatment_type_description", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "join", "treatment_types", ...
[ "List", "the", "first", "name", "of", "all", "the", "professionals", "along", "with", "the", "description", "of", "the", "treatment", "they", "have", "done", "." ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...
dog_kennels
SELECT DISTINCT T1.first_name , T3.treatment_type_description FROM professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id JOIN Treatment_types AS T3 ON T2.treatment_type_code = T3.treatment_type_code
What are each professional's first name and description of the treatment they have performed?
[ "SELECT", "DISTINCT", "T1.first_name", ",", "T3.treatment_type_description", "FROM", "professionals", "AS", "T1", "JOIN", "Treatments", "AS", "T2", "ON", "T1.professional_id", "=", "T2.professional_id", "JOIN", "Treatment_types", "AS", "T3", "ON", "T2.treatment_type_code"...
[ "select", "distinct", "t1", ".", "first_name", ",", "t3", ".", "treatment_type_description", "from", "professionals", "as", "t1", "join", "treatments", "as", "t2", "on", "t1", ".", "professional_id", "=", "t2", ".", "professional_id", "join", "treatment_types", ...
[ "What", "are", "each", "professional", "'s", "first", "name", "and", "description", "of", "the", "treatment", "they", "have", "performed", "?" ]
CREATE TABLE Breeds ( breed_code TEXT PRIMARY KEY, breed_name TEXT ); CREATE TABLE Charges ( charge_id NUMBER PRIMARY KEY, charge_type TEXT, charge_amount NUMBER ); CREATE TABLE Sizes ( size_code TEXT PRIMARY KEY, size_description TEXT ); CREATE TABLE Treatment_Types ( treatment_type_code TEXT PRIMAR...