db_id
stringclasses
140 values
schema
listlengths
0
26
question
stringlengths
16
224
query
stringlengths
18
577
query_toks
listlengths
4
90
query_toks_no_value
listlengths
4
125
question_toks
listlengths
4
44
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What kind of decor has the least number of reservations?
SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1;
[ "SELECT", "T2.decor", "FROM", "Reservations", "AS", "T1", "JOIN", "Rooms", "AS", "T2", "ON", "T1.Room", "=", "T2.RoomId", "GROUP", "BY", "T2.decor", "ORDER", "BY", "count", "(", "T2.decor", ")", "ASC", "LIMIT", "1", ";" ]
[ "select", "t2", ".", "decor", "from", "reservations", "as", "t1", "join", "rooms", "as", "t2", "on", "t1", ".", "room", "=", "t2", ".", "roomid", "group", "by", "t2", ".", "decor", "order", "by", "count", "(", "t2", ".", "decor", ")", "asc", "limit...
[ "What", "kind", "of", "decor", "has", "the", "least", "number", "of", "reservations", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What is the least popular kind of decor?
SELECT T2.decor FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T2.decor ORDER BY count(T2.decor) ASC LIMIT 1;
[ "SELECT", "T2.decor", "FROM", "Reservations", "AS", "T1", "JOIN", "Rooms", "AS", "T2", "ON", "T1.Room", "=", "T2.RoomId", "GROUP", "BY", "T2.decor", "ORDER", "BY", "count", "(", "T2.decor", ")", "ASC", "LIMIT", "1", ";" ]
[ "select", "t2", ".", "decor", "from", "reservations", "as", "t1", "join", "rooms", "as", "t2", "on", "t1", ".", "room", "=", "t2", ".", "roomid", "group", "by", "t2", ".", "decor", "order", "by", "count", "(", "t2", ".", "decor", ")", "asc", "limit...
[ "What", "is", "the", "least", "popular", "kind", "of", "decor", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
List how many times the number of people in the room reached the maximum occupancy of the room. The number of people include adults and kids.
SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids;
[ "SELECT", "count", "(", "*", ")", "FROM", "Reservations", "AS", "T1", "JOIN", "Rooms", "AS", "T2", "ON", "T1.Room", "=", "T2.RoomId", "WHERE", "T2.maxOccupancy", "=", "T1.Adults", "+", "T1.Kids", ";" ]
[ "select", "count", "(", "*", ")", "from", "reservations", "as", "t1", "join", "rooms", "as", "t2", "on", "t1", ".", "room", "=", "t2", ".", "roomid", "where", "t2", ".", "maxoccupancy", "=", "t1", ".", "adults", "+", "t1", ".", "kids" ]
[ "List", "how", "many", "times", "the", "number", "of", "people", "in", "the", "room", "reached", "the", "maximum", "occupancy", "of", "the", "room", ".", "The", "number", "of", "people", "include", "adults", "and", "kids", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
How many times the number of adults and kids staying in a room reached the maximum capacity of the room?
SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T2.maxOccupancy = T1.Adults + T1.Kids;
[ "SELECT", "count", "(", "*", ")", "FROM", "Reservations", "AS", "T1", "JOIN", "Rooms", "AS", "T2", "ON", "T1.Room", "=", "T2.RoomId", "WHERE", "T2.maxOccupancy", "=", "T1.Adults", "+", "T1.Kids", ";" ]
[ "select", "count", "(", "*", ")", "from", "reservations", "as", "t1", "join", "rooms", "as", "t2", "on", "t1", ".", "room", "=", "t2", ".", "roomid", "where", "t2", ".", "maxoccupancy", "=", "t1", ".", "adults", "+", "t1", ".", "kids" ]
[ "How", "many", "times", "the", "number", "of", "adults", "and", "kids", "staying", "in", "a", "room", "reached", "the", "maximum", "capacity", "of", "the", "room", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the first and last names of people who payed more than the rooms' base prices.
SELECT T1.firstname , T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0
[ "SELECT", "T1.firstname", ",", "T1.lastname", "FROM", "Reservations", "AS", "T1", "JOIN", "Rooms", "AS", "T2", "ON", "T1.Room", "=", "T2.RoomId", "WHERE", "T1.Rate", "-", "T2.basePrice", ">", "0" ]
[ "select", "t1", ".", "firstname", ",", "t1", ".", "lastname", "from", "reservations", "as", "t1", "join", "rooms", "as", "t2", "on", "t1", ".", "room", "=", "t2", ".", "roomid", "where", "t1", ".", "rate", "-", "t2", ".", "baseprice", ">", "value" ]
[ "Find", "the", "first", "and", "last", "names", "of", "people", "who", "payed", "more", "than", "the", "rooms", "'", "base", "prices", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What are the first and last names of people who payed more than the rooms' base prices?
SELECT T1.firstname , T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE T1.Rate - T2.basePrice > 0
[ "SELECT", "T1.firstname", ",", "T1.lastname", "FROM", "Reservations", "AS", "T1", "JOIN", "Rooms", "AS", "T2", "ON", "T1.Room", "=", "T2.RoomId", "WHERE", "T1.Rate", "-", "T2.basePrice", ">", "0" ]
[ "select", "t1", ".", "firstname", ",", "t1", ".", "lastname", "from", "reservations", "as", "t1", "join", "rooms", "as", "t2", "on", "t1", ".", "room", "=", "t2", ".", "roomid", "where", "t1", ".", "rate", "-", "t2", ".", "baseprice", ">", "value" ]
[ "What", "are", "the", "first", "and", "last", "names", "of", "people", "who", "payed", "more", "than", "the", "rooms", "'", "base", "prices", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
How many rooms are there?
SELECT count(*) FROM Rooms;
[ "SELECT", "count", "(", "*", ")", "FROM", "Rooms", ";" ]
[ "select", "count", "(", "*", ")", "from", "rooms" ]
[ "How", "many", "rooms", "are", "there", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What is the total number of rooms available in this inn?
SELECT count(*) FROM Rooms;
[ "SELECT", "count", "(", "*", ")", "FROM", "Rooms", ";" ]
[ "select", "count", "(", "*", ")", "from", "rooms" ]
[ "What", "is", "the", "total", "number", "of", "rooms", "available", "in", "this", "inn", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the number of rooms with a king bed.
SELECT count(*) FROM Rooms WHERE bedType = "King";
[ "SELECT", "count", "(", "*", ")", "FROM", "Rooms", "WHERE", "bedType", "=", "``", "King", "''", ";" ]
[ "select", "count", "(", "*", ")", "from", "rooms", "where", "bedtype", "=", "value" ]
[ "Find", "the", "number", "of", "rooms", "with", "a", "king", "bed", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
How many rooms have a king bed?
SELECT count(*) FROM Rooms WHERE bedType = "King";
[ "SELECT", "count", "(", "*", ")", "FROM", "Rooms", "WHERE", "bedType", "=", "``", "King", "''", ";" ]
[ "select", "count", "(", "*", ")", "from", "rooms", "where", "bedtype", "=", "value" ]
[ "How", "many", "rooms", "have", "a", "king", "bed", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the number of rooms for each bed type.
SELECT bedType , count(*) FROM Rooms GROUP BY bedType;
[ "SELECT", "bedType", ",", "count", "(", "*", ")", "FROM", "Rooms", "GROUP", "BY", "bedType", ";" ]
[ "select", "bedtype", ",", "count", "(", "*", ")", "from", "rooms", "group", "by", "bedtype" ]
[ "Find", "the", "number", "of", "rooms", "for", "each", "bed", "type", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What are the number of rooms for each bed type?
SELECT bedType , count(*) FROM Rooms GROUP BY bedType;
[ "SELECT", "bedType", ",", "count", "(", "*", ")", "FROM", "Rooms", "GROUP", "BY", "bedType", ";" ]
[ "select", "bedtype", ",", "count", "(", "*", ")", "from", "rooms", "group", "by", "bedtype" ]
[ "What", "are", "the", "number", "of", "rooms", "for", "each", "bed", "type", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the name of the room with the maximum occupancy.
SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;
[ "SELECT", "roomName", "FROM", "Rooms", "ORDER", "BY", "maxOccupancy", "DESC", "LIMIT", "1", ";" ]
[ "select", "roomname", "from", "rooms", "order", "by", "maxoccupancy", "desc", "limit", "value" ]
[ "Find", "the", "name", "of", "the", "room", "with", "the", "maximum", "occupancy", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What is the name of the room that can accommodate the most people?
SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;
[ "SELECT", "roomName", "FROM", "Rooms", "ORDER", "BY", "maxOccupancy", "DESC", "LIMIT", "1", ";" ]
[ "select", "roomname", "from", "rooms", "order", "by", "maxoccupancy", "desc", "limit", "value" ]
[ "What", "is", "the", "name", "of", "the", "room", "that", "can", "accommodate", "the", "most", "people", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the id and name of the most expensive base price room.
SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;
[ "SELECT", "RoomId", ",", "roomName", "FROM", "Rooms", "ORDER", "BY", "basePrice", "DESC", "LIMIT", "1", ";" ]
[ "select", "roomid", ",", "roomname", "from", "rooms", "order", "by", "baseprice", "desc", "limit", "value" ]
[ "Find", "the", "id", "and", "name", "of", "the", "most", "expensive", "base", "price", "room", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Which room has the highest base price?
SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;
[ "SELECT", "RoomId", ",", "roomName", "FROM", "Rooms", "ORDER", "BY", "basePrice", "DESC", "LIMIT", "1", ";" ]
[ "select", "roomid", ",", "roomname", "from", "rooms", "order", "by", "baseprice", "desc", "limit", "value" ]
[ "Which", "room", "has", "the", "highest", "base", "price", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
List the type of bed and name of all traditional rooms.
SELECT roomName , bedType FROM Rooms WHERE decor = "traditional";
[ "SELECT", "roomName", ",", "bedType", "FROM", "Rooms", "WHERE", "decor", "=", "``", "traditional", "''", ";" ]
[ "select", "roomname", ",", "bedtype", "from", "rooms", "where", "decor", "=", "value" ]
[ "List", "the", "type", "of", "bed", "and", "name", "of", "all", "traditional", "rooms", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What are the bed type and name of all the rooms with traditional decor?
SELECT roomName , bedType FROM Rooms WHERE decor = "traditional";
[ "SELECT", "roomName", ",", "bedType", "FROM", "Rooms", "WHERE", "decor", "=", "``", "traditional", "''", ";" ]
[ "select", "roomname", ",", "bedtype", "from", "rooms", "where", "decor", "=", "value" ]
[ "What", "are", "the", "bed", "type", "and", "name", "of", "all", "the", "rooms", "with", "traditional", "decor", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the number of rooms with king bed for each decor type.
SELECT decor , count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor;
[ "SELECT", "decor", ",", "count", "(", "*", ")", "FROM", "Rooms", "WHERE", "bedType", "=", "``", "King", "''", "GROUP", "BY", "decor", ";" ]
[ "select", "decor", ",", "count", "(", "*", ")", "from", "rooms", "where", "bedtype", "=", "value", "group", "by", "decor" ]
[ "Find", "the", "number", "of", "rooms", "with", "king", "bed", "for", "each", "decor", "type", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
How many rooms have king beds? Report the number for each decor type.
SELECT decor , count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor;
[ "SELECT", "decor", ",", "count", "(", "*", ")", "FROM", "Rooms", "WHERE", "bedType", "=", "``", "King", "''", "GROUP", "BY", "decor", ";" ]
[ "select", "decor", ",", "count", "(", "*", ")", "from", "rooms", "where", "bedtype", "=", "value", "group", "by", "decor" ]
[ "How", "many", "rooms", "have", "king", "beds", "?", "Report", "the", "number", "for", "each", "decor", "type", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the average and minimum price of the rooms in different decor.
SELECT decor , avg(basePrice) , min(basePrice) FROM Rooms GROUP BY decor;
[ "SELECT", "decor", ",", "avg", "(", "basePrice", ")", ",", "min", "(", "basePrice", ")", "FROM", "Rooms", "GROUP", "BY", "decor", ";" ]
[ "select", "decor", ",", "avg", "(", "baseprice", ")", ",", "min", "(", "baseprice", ")", "from", "rooms", "group", "by", "decor" ]
[ "Find", "the", "average", "and", "minimum", "price", "of", "the", "rooms", "in", "different", "decor", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What is the average minimum and price of the rooms for each different decor.
SELECT decor , avg(basePrice) , min(basePrice) FROM Rooms GROUP BY decor;
[ "SELECT", "decor", ",", "avg", "(", "basePrice", ")", ",", "min", "(", "basePrice", ")", "FROM", "Rooms", "GROUP", "BY", "decor", ";" ]
[ "select", "decor", ",", "avg", "(", "baseprice", ")", ",", "min", "(", "baseprice", ")", "from", "rooms", "group", "by", "decor" ]
[ "What", "is", "the", "average", "minimum", "and", "price", "of", "the", "rooms", "for", "each", "different", "decor", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
List the name of all rooms sorted by their prices.
SELECT roomName FROM Rooms ORDER BY basePrice;
[ "SELECT", "roomName", "FROM", "Rooms", "ORDER", "BY", "basePrice", ";" ]
[ "select", "roomname", "from", "rooms", "order", "by", "baseprice" ]
[ "List", "the", "name", "of", "all", "rooms", "sorted", "by", "their", "prices", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Sort all the rooms according to the price. Just report the room names.
SELECT roomName FROM Rooms ORDER BY basePrice;
[ "SELECT", "roomName", "FROM", "Rooms", "ORDER", "BY", "basePrice", ";" ]
[ "select", "roomname", "from", "rooms", "order", "by", "baseprice" ]
[ "Sort", "all", "the", "rooms", "according", "to", "the", "price", ".", "Just", "report", "the", "room", "names", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the number of rooms with price higher than 120 for different decor.
SELECT decor , count(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor;
[ "SELECT", "decor", ",", "count", "(", "*", ")", "FROM", "Rooms", "WHERE", "basePrice", ">", "120", "GROUP", "BY", "decor", ";" ]
[ "select", "decor", ",", "count", "(", "*", ")", "from", "rooms", "where", "baseprice", ">", "value", "group", "by", "decor" ]
[ "Find", "the", "number", "of", "rooms", "with", "price", "higher", "than", "120", "for", "different", "decor", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
How many rooms cost more than 120, for each different decor?
SELECT decor , count(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor;
[ "SELECT", "decor", ",", "count", "(", "*", ")", "FROM", "Rooms", "WHERE", "basePrice", ">", "120", "GROUP", "BY", "decor", ";" ]
[ "select", "decor", ",", "count", "(", "*", ")", "from", "rooms", "where", "baseprice", ">", "value", "group", "by", "decor" ]
[ "How", "many", "rooms", "cost", "more", "than", "120", ",", "for", "each", "different", "decor", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
For each bed type, find the average room price.
SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType;
[ "SELECT", "bedType", ",", "avg", "(", "basePrice", ")", "FROM", "Rooms", "GROUP", "BY", "bedType", ";" ]
[ "select", "bedtype", ",", "avg", "(", "baseprice", ")", "from", "rooms", "group", "by", "bedtype" ]
[ "For", "each", "bed", "type", ",", "find", "the", "average", "room", "price", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What is the average base price of rooms, for each bed type?
SELECT bedType , avg(basePrice) FROM Rooms GROUP BY bedType;
[ "SELECT", "bedType", ",", "avg", "(", "basePrice", ")", "FROM", "Rooms", "GROUP", "BY", "bedType", ";" ]
[ "select", "bedtype", ",", "avg", "(", "baseprice", ")", "from", "rooms", "group", "by", "bedtype" ]
[ "What", "is", "the", "average", "base", "price", "of", "rooms", ",", "for", "each", "bed", "type", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
List the name of rooms with king or queen bed.
SELECT roomName FROM Rooms WHERE bedType = "King" OR bedType = "Queen";
[ "SELECT", "roomName", "FROM", "Rooms", "WHERE", "bedType", "=", "``", "King", "''", "OR", "bedType", "=", "``", "Queen", "''", ";" ]
[ "select", "roomname", "from", "rooms", "where", "bedtype", "=", "value", "or", "bedtype", "=", "value" ]
[ "List", "the", "name", "of", "rooms", "with", "king", "or", "queen", "bed", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What are the names of rooms that have either king or queen bed?
SELECT roomName FROM Rooms WHERE bedType = "King" OR bedType = "Queen";
[ "SELECT", "roomName", "FROM", "Rooms", "WHERE", "bedType", "=", "``", "King", "''", "OR", "bedType", "=", "``", "Queen", "''", ";" ]
[ "select", "roomname", "from", "rooms", "where", "bedtype", "=", "value", "or", "bedtype", "=", "value" ]
[ "What", "are", "the", "names", "of", "rooms", "that", "have", "either", "king", "or", "queen", "bed", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
How many different types of beds are there?
SELECT count(DISTINCT bedType) FROM Rooms;
[ "SELECT", "count", "(", "DISTINCT", "bedType", ")", "FROM", "Rooms", ";" ]
[ "select", "count", "(", "distinct", "bedtype", ")", "from", "rooms" ]
[ "How", "many", "different", "types", "of", "beds", "are", "there", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the number of distinct bed types available in this inn.
SELECT count(DISTINCT bedType) FROM Rooms;
[ "SELECT", "count", "(", "DISTINCT", "bedType", ")", "FROM", "Rooms", ";" ]
[ "select", "count", "(", "distinct", "bedtype", ")", "from", "rooms" ]
[ "Find", "the", "number", "of", "distinct", "bed", "types", "available", "in", "this", "inn", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the name and id of the top 3 expensive rooms.
SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;
[ "SELECT", "RoomId", ",", "roomName", "FROM", "Rooms", "ORDER", "BY", "basePrice", "DESC", "LIMIT", "3", ";" ]
[ "select", "roomid", ",", "roomname", "from", "rooms", "order", "by", "baseprice", "desc", "limit", "value" ]
[ "Find", "the", "name", "and", "id", "of", "the", "top", "3", "expensive", "rooms", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What are the name and id of the three highest priced rooms?
SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3;
[ "SELECT", "RoomId", ",", "roomName", "FROM", "Rooms", "ORDER", "BY", "basePrice", "DESC", "LIMIT", "3", ";" ]
[ "select", "roomid", ",", "roomname", "from", "rooms", "order", "by", "baseprice", "desc", "limit", "value" ]
[ "What", "are", "the", "name", "and", "id", "of", "the", "three", "highest", "priced", "rooms", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the name of rooms whose price is higher than the average price.
SELECT roomName FROM Rooms WHERE basePrice > ( SELECT avg(basePrice) FROM Rooms );
[ "SELECT", "roomName", "FROM", "Rooms", "WHERE", "basePrice", ">", "(", "SELECT", "avg", "(", "basePrice", ")", "FROM", "Rooms", ")", ";" ]
[ "select", "roomname", "from", "rooms", "where", "baseprice", ">", "(", "select", "avg", "(", "baseprice", ")", "from", "rooms", ")" ]
[ "Find", "the", "name", "of", "rooms", "whose", "price", "is", "higher", "than", "the", "average", "price", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What are the name of rooms that cost more than the average.
SELECT roomName FROM Rooms WHERE basePrice > ( SELECT avg(basePrice) FROM Rooms );
[ "SELECT", "roomName", "FROM", "Rooms", "WHERE", "basePrice", ">", "(", "SELECT", "avg", "(", "basePrice", ")", "FROM", "Rooms", ")", ";" ]
[ "select", "roomname", "from", "rooms", "where", "baseprice", ">", "(", "select", "avg", "(", "baseprice", ")", "from", "rooms", ")" ]
[ "What", "are", "the", "name", "of", "rooms", "that", "cost", "more", "than", "the", "average", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the number of rooms that do not have any reservation.
SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)
[ "SELECT", "count", "(", "*", ")", "FROM", "rooms", "WHERE", "roomid", "NOT", "IN", "(", "SELECT", "DISTINCT", "room", "FROM", "reservations", ")" ]
[ "select", "count", "(", "*", ")", "from", "rooms", "where", "roomid", "not", "in", "(", "select", "distinct", "room", "from", "reservations", ")" ]
[ "Find", "the", "number", "of", "rooms", "that", "do", "not", "have", "any", "reservation", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
How many rooms have not had any reservation yet?
SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)
[ "SELECT", "count", "(", "*", ")", "FROM", "rooms", "WHERE", "roomid", "NOT", "IN", "(", "SELECT", "DISTINCT", "room", "FROM", "reservations", ")" ]
[ "select", "count", "(", "*", ")", "from", "rooms", "where", "roomid", "not", "in", "(", "select", "distinct", "room", "from", "reservations", ")" ]
[ "How", "many", "rooms", "have", "not", "had", "any", "reservation", "yet", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Return the name and number of reservations made for each of the rooms.
SELECT T2.roomName , count(*) , T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room
[ "SELECT", "T2.roomName", ",", "count", "(", "*", ")", ",", "T1.Room", "FROM", "Reservations", "AS", "T1", "JOIN", "Rooms", "AS", "T2", "ON", "T1.Room", "=", "T2.RoomId", "GROUP", "BY", "T1.Room" ]
[ "select", "t2", ".", "roomname", ",", "count", "(", "*", ")", ",", "t1", ".", "room", "from", "reservations", "as", "t1", "join", "rooms", "as", "t2", "on", "t1", ".", "room", "=", "t2", ".", "roomid", "group", "by", "t1", ".", "room" ]
[ "Return", "the", "name", "and", "number", "of", "reservations", "made", "for", "each", "of", "the", "rooms", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
For each room, find its name and the number of times reservations were made for it.
SELECT T2.roomName , count(*) , T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room
[ "SELECT", "T2.roomName", ",", "count", "(", "*", ")", ",", "T1.Room", "FROM", "Reservations", "AS", "T1", "JOIN", "Rooms", "AS", "T2", "ON", "T1.Room", "=", "T2.RoomId", "GROUP", "BY", "T1.Room" ]
[ "select", "t2", ".", "roomname", ",", "count", "(", "*", ")", ",", "t1", ".", "room", "from", "reservations", "as", "t1", "join", "rooms", "as", "t2", "on", "t1", ".", "room", "=", "t2", ".", "roomid", "group", "by", "t1", ".", "room" ]
[ "For", "each", "room", ",", "find", "its", "name", "and", "the", "number", "of", "times", "reservations", "were", "made", "for", "it", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the names of rooms that have been reserved for more than 60 times.
SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING count(*) > 60
[ "SELECT", "T2.roomName", "FROM", "Reservations", "AS", "T1", "JOIN", "Rooms", "AS", "T2", "ON", "T1.Room", "=", "T2.RoomId", "GROUP", "BY", "T1.Room", "HAVING", "count", "(", "*", ")", ">", "60" ]
[ "select", "t2", ".", "roomname", "from", "reservations", "as", "t1", "join", "rooms", "as", "t2", "on", "t1", ".", "room", "=", "t2", ".", "roomid", "group", "by", "t1", ".", "room", "having", "count", "(", "*", ")", ">", "value" ]
[ "Find", "the", "names", "of", "rooms", "that", "have", "been", "reserved", "for", "more", "than", "60", "times", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What are the names of rooms whose reservation frequency exceeds 60 times?
SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room HAVING count(*) > 60
[ "SELECT", "T2.roomName", "FROM", "Reservations", "AS", "T1", "JOIN", "Rooms", "AS", "T2", "ON", "T1.Room", "=", "T2.RoomId", "GROUP", "BY", "T1.Room", "HAVING", "count", "(", "*", ")", ">", "60" ]
[ "select", "t2", ".", "roomname", "from", "reservations", "as", "t1", "join", "rooms", "as", "t2", "on", "t1", ".", "room", "=", "t2", ".", "roomid", "group", "by", "t1", ".", "room", "having", "count", "(", "*", ")", ">", "value" ]
[ "What", "are", "the", "names", "of", "rooms", "whose", "reservation", "frequency", "exceeds", "60", "times", "?" ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the name of rooms whose base price is between 120 and 150.
SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150
[ "SELECT", "roomname", "FROM", "rooms", "WHERE", "baseprice", "BETWEEN", "120", "AND", "150" ]
[ "select", "roomname", "from", "rooms", "where", "baseprice", "between", "value", "and", "value" ]
[ "Find", "the", "name", "of", "rooms", "whose", "base", "price", "is", "between", "120", "and", "150", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Which rooms cost between 120 and 150? Give me the room names.
SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150
[ "SELECT", "roomname", "FROM", "rooms", "WHERE", "baseprice", "BETWEEN", "120", "AND", "150" ]
[ "select", "roomname", "from", "rooms", "where", "baseprice", "between", "value", "and", "value" ]
[ "Which", "rooms", "cost", "between", "120", "and", "150", "?", "Give", "me", "the", "room", "names", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
Find the name of rooms booked by some customers whose first name contains ROY.
SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'
[ "SELECT", "T2.roomName", "FROM", "Reservations", "AS", "T1", "JOIN", "Rooms", "AS", "T2", "ON", "T1.Room", "=", "T2.RoomId", "WHERE", "firstname", "LIKE", "'", "%", "ROY", "%", "'" ]
[ "select", "t2", ".", "roomname", "from", "reservations", "as", "t1", "join", "rooms", "as", "t2", "on", "t1", ".", "room", "=", "t2", ".", "roomid", "where", "firstname", "like", "value" ]
[ "Find", "the", "name", "of", "rooms", "booked", "by", "some", "customers", "whose", "first", "name", "contains", "ROY", "." ]
inn_1
[ "CREATE TABLE \"Rooms\" ( \n\t\"RoomId\" TEXT PRIMARY KEY,\n\t\"roomName\" TEXT, \n\t\"beds\" INTEGER, \n\t\"bedType\" TEXT, \n\t\"maxOccupancy\" INTEGER, \n\t\"basePrice\" INTEGER, \n\t\"decor\" TEXT\n\n);", "CREATE TABLE \"Reservations\" ( \n\t\"Code\" INTEGER PRIMARY KEY, \n\t\"Room\" TEXT, \n\t\"CheckIn\" TEX...
What are the name of rooms booked by customers whose first name has "ROY" in part?
SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE firstname LIKE '%ROY%'
[ "SELECT", "T2.roomName", "FROM", "Reservations", "AS", "T1", "JOIN", "Rooms", "AS", "T2", "ON", "T1.Room", "=", "T2.RoomId", "WHERE", "firstname", "LIKE", "'", "%", "ROY", "%", "'" ]
[ "select", "t2", ".", "roomname", "from", "reservations", "as", "t1", "join", "rooms", "as", "t2", "on", "t1", ".", "room", "=", "t2", ".", "roomid", "where", "firstname", "like", "value" ]
[ "What", "are", "the", "name", "of", "rooms", "booked", "by", "customers", "whose", "first", "name", "has", "``", "ROY", "''", "in", "part", "?" ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
what are the details of the cmi masters that have the cross reference code 'Tax'?
SELECT T1.cmi_details FROM Customer_Master_Index AS T1 JOIN CMI_Cross_References AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T2.source_system_code = 'Tax'
[ "SELECT", "T1.cmi_details", "FROM", "Customer_Master_Index", "AS", "T1", "JOIN", "CMI_Cross_References", "AS", "T2", "ON", "T1.master_customer_id", "=", "T2.master_customer_id", "WHERE", "T2.source_system_code", "=", "'Tax", "'" ]
[ "select", "t1", ".", "cmi_details", "from", "customer_master_index", "as", "t1", "join", "cmi_cross_references", "as", "t2", "on", "t1", ".", "master_customer_id", "=", "t2", ".", "master_customer_id", "where", "t2", ".", "source_system_code", "=", "value" ]
[ "what", "are", "the", "details", "of", "the", "cmi", "masters", "that", "have", "the", "cross", "reference", "code", "'Tax", "'", "?" ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
What is the cmi cross reference id that is related to at least one council tax entry? List the cross reference id and source system code.
SELECT T1.cmi_cross_ref_id , T1.source_system_code FROM CMI_Cross_References AS T1 JOIN Council_Tax AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T1.cmi_cross_ref_id HAVING count(*) >= 1
[ "SELECT", "T1.cmi_cross_ref_id", ",", "T1.source_system_code", "FROM", "CMI_Cross_References", "AS", "T1", "JOIN", "Council_Tax", "AS", "T2", "ON", "T1.cmi_cross_ref_id", "=", "T2.cmi_cross_ref_id", "GROUP", "BY", "T1.cmi_cross_ref_id", "HAVING", "count", "(", "*", ")",...
[ "select", "t1", ".", "cmi_cross_ref_id", ",", "t1", ".", "source_system_code", "from", "cmi_cross_references", "as", "t1", "join", "council_tax", "as", "t2", "on", "t1", ".", "cmi_cross_ref_id", "=", "t2", ".", "cmi_cross_ref_id", "group", "by", "t1", ".", "cm...
[ "What", "is", "the", "cmi", "cross", "reference", "id", "that", "is", "related", "to", "at", "least", "one", "council", "tax", "entry", "?", "List", "the", "cross", "reference", "id", "and", "source", "system", "code", "." ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n
SELECT T2.cmi_cross_ref_id , T2.master_customer_id , count(*) FROM Business_Rates AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id GROUP BY T2.cmi_cross_ref_id
[ "SELECT", "T2.cmi_cross_ref_id", ",", "T2.master_customer_id", ",", "count", "(", "*", ")", "FROM", "Business_Rates", "AS", "T1", "JOIN", "CMI_Cross_References", "AS", "T2", "ON", "T1.cmi_cross_ref_id", "=", "T2.cmi_cross_ref_id", "GROUP", "BY", "T2.cmi_cross_ref_id" ]
[ "select", "t2", ".", "cmi_cross_ref_id", ",", "t2", ".", "master_customer_id", ",", "count", "(", "*", ")", "from", "business_rates", "as", "t1", "join", "cmi_cross_references", "as", "t2", "on", "t1", ".", "cmi_cross_ref_id", "=", "t2", ".", "cmi_cross_ref_id...
[ "How", "many", "business", "rates", "are", "related", "to", "each", "cmi", "cross", "reference", "?", "List", "cross", "reference", "id", ",", "master", "customer", "id", "and", "the", "n" ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id.
SELECT T1.source_system_code , T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id ORDER BY T2.council_tax_id
[ "SELECT", "T1.source_system_code", ",", "T2.council_tax_id", "FROM", "CMI_Cross_References", "AS", "T1", "JOIN", "Benefits_Overpayments", "AS", "T2", "ON", "T1.cmi_cross_ref_id", "=", "T2.cmi_cross_ref_id", "ORDER", "BY", "T2.council_tax_id" ]
[ "select", "t1", ".", "source_system_code", ",", "t2", ".", "council_tax_id", "from", "cmi_cross_references", "as", "t1", "join", "benefits_overpayments", "as", "t2", "on", "t1", ".", "cmi_cross_ref_id", "=", "t2", ".", "cmi_cross_ref_id", "order", "by", "t2", "....
[ "What", "is", "the", "tax", "source", "system", "code", "related", "to", "the", "benefits", "and", "overpayments", "?", "List", "the", "code", "and", "the", "benifit", "id", ",", "order", "by", "benifit", "id", "." ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
Wat is the tax source system code and master customer id of the taxes related to each parking fine id?
SELECT T1.source_system_code , T1.master_customer_id , T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id
[ "SELECT", "T1.source_system_code", ",", "T1.master_customer_id", ",", "T2.council_tax_id", "FROM", "CMI_Cross_References", "AS", "T1", "JOIN", "Parking_Fines", "AS", "T2", "ON", "T1.cmi_cross_ref_id", "=", "T2.cmi_cross_ref_id" ]
[ "select", "t1", ".", "source_system_code", ",", "t1", ".", "master_customer_id", ",", "t2", ".", "council_tax_id", "from", "cmi_cross_references", "as", "t1", "join", "parking_fines", "as", "t2", "on", "t1", ".", "cmi_cross_ref_id", "=", "t2", ".", "cmi_cross_re...
[ "Wat", "is", "the", "tax", "source", "system", "code", "and", "master", "customer", "id", "of", "the", "taxes", "related", "to", "each", "parking", "fine", "id", "?" ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'?
SELECT T1.council_tax_id FROM Rent_Arrears AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id JOIN Customer_Master_Index AS T3 ON T3.master_customer_id = T2.master_customer_id WHERE T3.cmi_details != 'Schmidt , Kertzmann and Lubowitz'
[ "SELECT", "T1.council_tax_id", "FROM", "Rent_Arrears", "AS", "T1", "JOIN", "CMI_Cross_References", "AS", "T2", "ON", "T1.cmi_cross_ref_id", "=", "T2.cmi_cross_ref_id", "JOIN", "Customer_Master_Index", "AS", "T3", "ON", "T3.master_customer_id", "=", "T2.master_customer_id", ...
[ "select", "t1", ".", "council_tax_id", "from", "rent_arrears", "as", "t1", "join", "cmi_cross_references", "as", "t2", "on", "t1", ".", "cmi_cross_ref_id", "=", "t2", ".", "cmi_cross_ref_id", "join", "customer_master_index", "as", "t3", "on", "t3", ".", "master_...
[ "What", "are", "the", "renting", "arrears", "tax", "ids", "related", "to", "the", "customer", "master", "index", "whose", "detail", "is", "not", "'Schmidt", ",", "Kertzmann", "and", "Lubowitz", "'", "?" ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?
SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id = T2.cmi_cross_ref_id WHERE T2.source_system_code = 'Electoral' OR T2.source_system_code = 'Tax'
[ "SELECT", "T1.electoral_register_id", "FROM", "Electoral_Register", "AS", "T1", "JOIN", "CMI_Cross_References", "AS", "T2", "ON", "T1.cmi_cross_ref_id", "=", "T2.cmi_cross_ref_id", "WHERE", "T2.source_system_code", "=", "'Electoral", "'", "OR", "T2.source_system_code", "=",...
[ "select", "t1", ".", "electoral_register_id", "from", "electoral_register", "as", "t1", "join", "cmi_cross_references", "as", "t2", "on", "t1", ".", "cmi_cross_ref_id", "=", "t2", ".", "cmi_cross_ref_id", "where", "t2", ".", "source_system_code", "=", "value", "or...
[ "What", "are", "the", "register", "ids", "of", "electoral", "registries", "that", "have", "the", "cross", "reference", "source", "system", "code", "'Electoral", "'", "or", "'Tax", "'", "?" ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
How many different source system code for the cmi cross references are there?
SELECT count(DISTINCT source_system_code) FROM CMI_cross_references
[ "SELECT", "count", "(", "DISTINCT", "source_system_code", ")", "FROM", "CMI_cross_references" ]
[ "select", "count", "(", "distinct", "source_system_code", ")", "from", "cmi_cross_references" ]
[ "How", "many", "different", "source", "system", "code", "for", "the", "cmi", "cross", "references", "are", "there", "?" ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
List all information about customer master index, and sort them by details in descending order.
SELECT * FROM customer_master_index ORDER BY cmi_details DESC
[ "SELECT", "*", "FROM", "customer_master_index", "ORDER", "BY", "cmi_details", "DESC" ]
[ "select", "*", "from", "customer_master_index", "order", "by", "cmi_details", "desc" ]
[ "List", "all", "information", "about", "customer", "master", "index", ",", "and", "sort", "them", "by", "details", "in", "descending", "order", "." ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
List the council tax ids and their related cmi cross references of all the parking fines.
SELECT council_tax_id , cmi_cross_ref_id FROM parking_fines
[ "SELECT", "council_tax_id", ",", "cmi_cross_ref_id", "FROM", "parking_fines" ]
[ "select", "council_tax_id", ",", "cmi_cross_ref_id", "from", "parking_fines" ]
[ "List", "the", "council", "tax", "ids", "and", "their", "related", "cmi", "cross", "references", "of", "all", "the", "parking", "fines", "." ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
How many council taxes are collected for renting arrears ?
SELECT count(*) FROM rent_arrears
[ "SELECT", "count", "(", "*", ")", "FROM", "rent_arrears" ]
[ "select", "count", "(", "*", ")", "from", "rent_arrears" ]
[ "How", "many", "council", "taxes", "are", "collected", "for", "renting", "arrears", "?" ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?
SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id = T2.master_customer_id WHERE T1.cmi_details = 'Gottlieb , Becker and Wyman'
[ "SELECT", "DISTINCT", "T2.source_system_code", "FROM", "customer_master_index", "AS", "T1", "JOIN", "cmi_cross_references", "AS", "T2", "ON", "T1.master_customer_id", "=", "T2.master_customer_id", "WHERE", "T1.cmi_details", "=", "'Gottlieb", ",", "Becker", "and", "Wyman",...
[ "select", "distinct", "t2", ".", "source_system_code", "from", "customer_master_index", "as", "t1", "join", "cmi_cross_references", "as", "t2", "on", "t1", ".", "master_customer_id", "=", "t2", ".", "master_customer_id", "where", "t1", ".", "cmi_details", "=", "va...
[ "What", "are", "the", "distinct", "cross", "reference", "source", "system", "codes", "which", "are", "related", "to", "the", "master", "customer", "details", "'Gottlieb", ",", "Becker", "and", "Wyman", "'", "?" ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
Which cmi cross reference id is not related to any parking taxes?
SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines
[ "SELECT", "cmi_cross_ref_id", "FROM", "cmi_cross_references", "EXCEPT", "SELECT", "cmi_cross_ref_id", "FROM", "parking_fines" ]
[ "select", "cmi_cross_ref_id", "from", "cmi_cross_references", "except", "select", "cmi_cross_ref_id", "from", "parking_fines" ]
[ "Which", "cmi", "cross", "reference", "id", "is", "not", "related", "to", "any", "parking", "taxes", "?" ]
local_govt_mdm
[ "CREATE TABLE Customer_Master_Index (\nmaster_customer_id INTEGER NOT NULL,\ncmi_details VARCHAR(255),\nPRIMARY KEY (master_customer_id)\n);", "CREATE TABLE CMI_Cross_References (\ncmi_cross_ref_id INTEGER NOT NULL,\nmaster_customer_id INTEGER NOT NULL,\nsource_system_code CHAR(15) NOT NULL,\nPRIMARY KEY (cmi_cro...
Which distinct source system code includes the substring 'en'?
SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code LIKE '%en%'
[ "SELECT", "DISTINCT", "source_system_code", "FROM", "cmi_cross_references", "WHERE", "source_system_code", "LIKE", "'", "%", "en", "%", "'" ]
[ "select", "distinct", "source_system_code", "from", "cmi_cross_references", "where", "source_system_code", "like", "value" ]
[ "Which", "distinct", "source", "system", "code", "includes", "the", "substring", "'en", "'", "?" ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
How many parties are there?
SELECT count(*) FROM party
[ "SELECT", "count", "(", "*", ")", "FROM", "party" ]
[ "select", "count", "(", "*", ")", "from", "party" ]
[ "How", "many", "parties", "are", "there", "?" ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Count the number of parties.
SELECT count(*) FROM party
[ "SELECT", "count", "(", "*", ")", "FROM", "party" ]
[ "select", "count", "(", "*", ")", "from", "party" ]
[ "Count", "the", "number", "of", "parties", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
List the themes of parties in ascending order of number of hosts.
SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC
[ "SELECT", "Party_Theme", "FROM", "party", "ORDER", "BY", "Number_of_hosts", "ASC" ]
[ "select", "party_theme", "from", "party", "order", "by", "number_of_hosts", "asc" ]
[ "List", "the", "themes", "of", "parties", "in", "ascending", "order", "of", "number", "of", "hosts", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
What are the themes of parties ordered by the number of hosts in ascending manner?
SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC
[ "SELECT", "Party_Theme", "FROM", "party", "ORDER", "BY", "Number_of_hosts", "ASC" ]
[ "select", "party_theme", "from", "party", "order", "by", "number_of_hosts", "asc" ]
[ "What", "are", "the", "themes", "of", "parties", "ordered", "by", "the", "number", "of", "hosts", "in", "ascending", "manner", "?" ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
What are the themes and locations of parties?
SELECT Party_Theme , LOCATION FROM party
[ "SELECT", "Party_Theme", ",", "LOCATION", "FROM", "party" ]
[ "select", "party_theme", ",", "location", "from", "party" ]
[ "What", "are", "the", "themes", "and", "locations", "of", "parties", "?" ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Give me the theme and location of each party.
SELECT Party_Theme , LOCATION FROM party
[ "SELECT", "Party_Theme", ",", "LOCATION", "FROM", "party" ]
[ "select", "party_theme", ",", "location", "from", "party" ]
[ "Give", "me", "the", "theme", "and", "location", "of", "each", "party", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Show the first year and last year of parties with theme "Spring" or "Teqnology".
SELECT First_year , Last_year FROM party WHERE Party_Theme = "Spring" OR Party_Theme = "Teqnology"
[ "SELECT", "First_year", ",", "Last_year", "FROM", "party", "WHERE", "Party_Theme", "=", "``", "Spring", "''", "OR", "Party_Theme", "=", "``", "Teqnology", "''" ]
[ "select", "first_year", ",", "last_year", "from", "party", "where", "party_theme", "=", "value", "or", "party_theme", "=", "value" ]
[ "Show", "the", "first", "year", "and", "last", "year", "of", "parties", "with", "theme", "``", "Spring", "''", "or", "``", "Teqnology", "''", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
What are the first year and last year of the parties whose theme is "Spring" or "Teqnology"?
SELECT First_year , Last_year FROM party WHERE Party_Theme = "Spring" OR Party_Theme = "Teqnology"
[ "SELECT", "First_year", ",", "Last_year", "FROM", "party", "WHERE", "Party_Theme", "=", "``", "Spring", "''", "OR", "Party_Theme", "=", "``", "Teqnology", "''" ]
[ "select", "first_year", ",", "last_year", "from", "party", "where", "party_theme", "=", "value", "or", "party_theme", "=", "value" ]
[ "What", "are", "the", "first", "year", "and", "last", "year", "of", "the", "parties", "whose", "theme", "is", "``", "Spring", "''", "or", "``", "Teqnology", "''", "?" ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
What is the average number of hosts for parties?
SELECT avg(Number_of_hosts) FROM party
[ "SELECT", "avg", "(", "Number_of_hosts", ")", "FROM", "party" ]
[ "select", "avg", "(", "number_of_hosts", ")", "from", "party" ]
[ "What", "is", "the", "average", "number", "of", "hosts", "for", "parties", "?" ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Compute the average number of hosts for parties.
SELECT avg(Number_of_hosts) FROM party
[ "SELECT", "avg", "(", "Number_of_hosts", ")", "FROM", "party" ]
[ "select", "avg", "(", "number_of_hosts", ")", "from", "party" ]
[ "Compute", "the", "average", "number", "of", "hosts", "for", "parties", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
What is the location of the party with the most hosts?
SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1
[ "SELECT", "LOCATION", "FROM", "party", "ORDER", "BY", "Number_of_hosts", "DESC", "LIMIT", "1" ]
[ "select", "location", "from", "party", "order", "by", "number_of_hosts", "desc", "limit", "value" ]
[ "What", "is", "the", "location", "of", "the", "party", "with", "the", "most", "hosts", "?" ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Which party had the most hosts? Give me the party location.
SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1
[ "SELECT", "LOCATION", "FROM", "party", "ORDER", "BY", "Number_of_hosts", "DESC", "LIMIT", "1" ]
[ "select", "location", "from", "party", "order", "by", "number_of_hosts", "desc", "limit", "value" ]
[ "Which", "party", "had", "the", "most", "hosts", "?", "Give", "me", "the", "party", "location", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Show different nationalities along with the number of hosts of each nationality.
SELECT Nationality , COUNT(*) FROM HOST GROUP BY Nationality
[ "SELECT", "Nationality", ",", "COUNT", "(", "*", ")", "FROM", "HOST", "GROUP", "BY", "Nationality" ]
[ "select", "nationality", ",", "count", "(", "*", ")", "from", "host", "group", "by", "nationality" ]
[ "Show", "different", "nationalities", "along", "with", "the", "number", "of", "hosts", "of", "each", "nationality", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
How many hosts does each nationality have? List the nationality and the count.
SELECT Nationality , COUNT(*) FROM HOST GROUP BY Nationality
[ "SELECT", "Nationality", ",", "COUNT", "(", "*", ")", "FROM", "HOST", "GROUP", "BY", "Nationality" ]
[ "select", "nationality", ",", "count", "(", "*", ")", "from", "host", "group", "by", "nationality" ]
[ "How", "many", "hosts", "does", "each", "nationality", "have", "?", "List", "the", "nationality", "and", "the", "count", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Show the most common nationality of hosts.
SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
[ "SELECT", "Nationality", "FROM", "HOST", "GROUP", "BY", "Nationality", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "nationality", "from", "host", "group", "by", "nationality", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Show", "the", "most", "common", "nationality", "of", "hosts", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Which nationality has the most hosts?
SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
[ "SELECT", "Nationality", "FROM", "HOST", "GROUP", "BY", "Nationality", "ORDER", "BY", "COUNT", "(", "*", ")", "DESC", "LIMIT", "1" ]
[ "select", "nationality", "from", "host", "group", "by", "nationality", "order", "by", "count", "(", "*", ")", "desc", "limit", "value" ]
[ "Which", "nationality", "has", "the", "most", "hosts", "?" ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Show the nations that have both hosts older than 45 and hosts younger than 35.
SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35
[ "SELECT", "Nationality", "FROM", "HOST", "WHERE", "Age", ">", "45", "INTERSECT", "SELECT", "Nationality", "FROM", "HOST", "WHERE", "Age", "<", "35" ]
[ "select", "nationality", "from", "host", "where", "age", ">", "value", "intersect", "select", "nationality", "from", "host", "where", "age", "<", "value" ]
[ "Show", "the", "nations", "that", "have", "both", "hosts", "older", "than", "45", "and", "hosts", "younger", "than", "35", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Which nations have both hosts of age above 45 and hosts of age below 35?
SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35
[ "SELECT", "Nationality", "FROM", "HOST", "WHERE", "Age", ">", "45", "INTERSECT", "SELECT", "Nationality", "FROM", "HOST", "WHERE", "Age", "<", "35" ]
[ "select", "nationality", "from", "host", "where", "age", ">", "value", "intersect", "select", "nationality", "from", "host", "where", "age", "<", "value" ]
[ "Which", "nations", "have", "both", "hosts", "of", "age", "above", "45", "and", "hosts", "of", "age", "below", "35", "?" ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Show the themes of parties and the names of the party hosts.
SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID
[ "SELECT", "T3.Party_Theme", ",", "T2.Name", "FROM", "party_host", "AS", "T1", "JOIN", "HOST", "AS", "T2", "ON", "T1.Host_ID", "=", "T2.Host_ID", "JOIN", "party", "AS", "T3", "ON", "T1.Party_ID", "=", "T3.Party_ID" ]
[ "select", "t3", ".", "party_theme", ",", "t2", ".", "name", "from", "party_host", "as", "t1", "join", "host", "as", "t2", "on", "t1", ".", "host_id", "=", "t2", ".", "host_id", "join", "party", "as", "t3", "on", "t1", ".", "party_id", "=", "t3", "....
[ "Show", "the", "themes", "of", "parties", "and", "the", "names", "of", "the", "party", "hosts", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
For each party, return its theme and the name of its host.
SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID
[ "SELECT", "T3.Party_Theme", ",", "T2.Name", "FROM", "party_host", "AS", "T1", "JOIN", "HOST", "AS", "T2", "ON", "T1.Host_ID", "=", "T2.Host_ID", "JOIN", "party", "AS", "T3", "ON", "T1.Party_ID", "=", "T3.Party_ID" ]
[ "select", "t3", ".", "party_theme", ",", "t2", ".", "name", "from", "party_host", "as", "t1", "join", "host", "as", "t2", "on", "t1", ".", "host_id", "=", "t2", ".", "host_id", "join", "party", "as", "t3", "on", "t1", ".", "party_id", "=", "t3", "....
[ "For", "each", "party", ",", "return", "its", "theme", "and", "the", "name", "of", "its", "host", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Show the locations of parties and the names of the party hosts in ascending order of the age of the host.
SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age
[ "SELECT", "T3.Location", ",", "T2.Name", "FROM", "party_host", "AS", "T1", "JOIN", "HOST", "AS", "T2", "ON", "T1.Host_ID", "=", "T2.Host_ID", "JOIN", "party", "AS", "T3", "ON", "T1.Party_ID", "=", "T3.Party_ID", "ORDER", "BY", "T2.Age" ]
[ "select", "t3", ".", "location", ",", "t2", ".", "name", "from", "party_host", "as", "t1", "join", "host", "as", "t2", "on", "t1", ".", "host_id", "=", "t2", ".", "host_id", "join", "party", "as", "t3", "on", "t1", ".", "party_id", "=", "t3", ".", ...
[ "Show", "the", "locations", "of", "parties", "and", "the", "names", "of", "the", "party", "hosts", "in", "ascending", "order", "of", "the", "age", "of", "the", "host", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host.
SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age
[ "SELECT", "T3.Location", ",", "T2.Name", "FROM", "party_host", "AS", "T1", "JOIN", "HOST", "AS", "T2", "ON", "T1.Host_ID", "=", "T2.Host_ID", "JOIN", "party", "AS", "T3", "ON", "T1.Party_ID", "=", "T3.Party_ID", "ORDER", "BY", "T2.Age" ]
[ "select", "t3", ".", "location", ",", "t2", ".", "name", "from", "party_host", "as", "t1", "join", "host", "as", "t2", "on", "t1", ".", "host_id", "=", "t2", ".", "host_id", "join", "party", "as", "t3", "on", "t1", ".", "party_id", "=", "t3", ".", ...
[ "For", "each", "party", ",", "find", "its", "location", "and", "the", "name", "of", "its", "host", ".", "Sort", "the", "result", "in", "ascending", "order", "of", "the", "age", "of", "the", "host", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Show the locations of parties with hosts older than 50.
SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50
[ "SELECT", "T3.Location", "FROM", "party_host", "AS", "T1", "JOIN", "HOST", "AS", "T2", "ON", "T1.Host_ID", "=", "T2.Host_ID", "JOIN", "party", "AS", "T3", "ON", "T1.Party_ID", "=", "T3.Party_ID", "WHERE", "T2.Age", ">", "50" ]
[ "select", "t3", ".", "location", "from", "party_host", "as", "t1", "join", "host", "as", "t2", "on", "t1", ".", "host_id", "=", "t2", ".", "host_id", "join", "party", "as", "t3", "on", "t1", ".", "party_id", "=", "t3", ".", "party_id", "where", "t2",...
[ "Show", "the", "locations", "of", "parties", "with", "hosts", "older", "than", "50", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Which parties have hosts of age above 50? Give me the party locations.
SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50
[ "SELECT", "T3.Location", "FROM", "party_host", "AS", "T1", "JOIN", "HOST", "AS", "T2", "ON", "T1.Host_ID", "=", "T2.Host_ID", "JOIN", "party", "AS", "T3", "ON", "T1.Party_ID", "=", "T3.Party_ID", "WHERE", "T2.Age", ">", "50" ]
[ "select", "t3", ".", "location", "from", "party_host", "as", "t1", "join", "host", "as", "t2", "on", "t1", ".", "host_id", "=", "t2", ".", "host_id", "join", "party", "as", "t3", "on", "t1", ".", "party_id", "=", "t3", ".", "party_id", "where", "t2",...
[ "Which", "parties", "have", "hosts", "of", "age", "above", "50", "?", "Give", "me", "the", "party", "locations", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Show the host names for parties with number of hosts greater than 20.
SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20
[ "SELECT", "T2.Name", "FROM", "party_host", "AS", "T1", "JOIN", "HOST", "AS", "T2", "ON", "T1.Host_ID", "=", "T2.Host_ID", "JOIN", "party", "AS", "T3", "ON", "T1.Party_ID", "=", "T3.Party_ID", "WHERE", "T3.Number_of_hosts", ">", "20" ]
[ "select", "t2", ".", "name", "from", "party_host", "as", "t1", "join", "host", "as", "t2", "on", "t1", ".", "host_id", "=", "t2", ".", "host_id", "join", "party", "as", "t3", "on", "t1", ".", "party_id", "=", "t3", ".", "party_id", "where", "t3", "...
[ "Show", "the", "host", "names", "for", "parties", "with", "number", "of", "hosts", "greater", "than", "20", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Which parties have more than 20 hosts? Give me the host names for these parties.
SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20
[ "SELECT", "T2.Name", "FROM", "party_host", "AS", "T1", "JOIN", "HOST", "AS", "T2", "ON", "T1.Host_ID", "=", "T2.Host_ID", "JOIN", "party", "AS", "T3", "ON", "T1.Party_ID", "=", "T3.Party_ID", "WHERE", "T3.Number_of_hosts", ">", "20" ]
[ "select", "t2", ".", "name", "from", "party_host", "as", "t1", "join", "host", "as", "t2", "on", "t1", ".", "host_id", "=", "t2", ".", "host_id", "join", "party", "as", "t3", "on", "t1", ".", "party_id", "=", "t3", ".", "party_id", "where", "t3", "...
[ "Which", "parties", "have", "more", "than", "20", "hosts", "?", "Give", "me", "the", "host", "names", "for", "these", "parties", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
Show the name and the nationality of the oldest host.
SELECT Name , Nationality FROM HOST ORDER BY Age DESC LIMIT 1
[ "SELECT", "Name", ",", "Nationality", "FROM", "HOST", "ORDER", "BY", "Age", "DESC", "LIMIT", "1" ]
[ "select", "name", ",", "nationality", "from", "host", "order", "by", "age", "desc", "limit", "value" ]
[ "Show", "the", "name", "and", "the", "nationality", "of", "the", "oldest", "host", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
What are the name and the nationality of the host of the highest age?
SELECT Name , Nationality FROM HOST ORDER BY Age DESC LIMIT 1
[ "SELECT", "Name", ",", "Nationality", "FROM", "HOST", "ORDER", "BY", "Age", "DESC", "LIMIT", "1" ]
[ "select", "name", ",", "nationality", "from", "host", "order", "by", "age", "desc", "limit", "value" ]
[ "What", "are", "the", "name", "and", "the", "nationality", "of", "the", "host", "of", "the", "highest", "age", "?" ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
List the names of hosts who did not serve as a host of any party in our record.
SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host)
[ "SELECT", "Name", "FROM", "HOST", "WHERE", "Host_ID", "NOT", "IN", "(", "SELECT", "Host_ID", "FROM", "party_host", ")" ]
[ "select", "name", "from", "host", "where", "host_id", "not", "in", "(", "select", "host_id", "from", "party_host", ")" ]
[ "List", "the", "names", "of", "hosts", "who", "did", "not", "serve", "as", "a", "host", "of", "any", "party", "in", "our", "record", "." ]
party_host
[ "CREATE TABLE \"party\" (\n\"Party_ID\" int,\n\"Party_Theme\" text,\n\"Location\" text,\n\"First_year\" text,\n\"Last_year\" text,\n\"Number_of_hosts\" int,\nPRIMARY KEY (\"Party_ID\")\n);", "CREATE TABLE \"host\" (\n\"Host_ID\" int,\n\"Name\" text,\n\"Nationality\" text,\n\"Age\" text,\nPRIMARY KEY (\"Host_ID\")...
What are the names of hosts who did not host any party in our record?
SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host)
[ "SELECT", "Name", "FROM", "HOST", "WHERE", "Host_ID", "NOT", "IN", "(", "SELECT", "Host_ID", "FROM", "party_host", ")" ]
[ "select", "name", "from", "host", "where", "host_id", "not", "in", "(", "select", "host_id", "from", "party_host", ")" ]
[ "What", "are", "the", "names", "of", "hosts", "who", "did", "not", "host", "any", "party", "in", "our", "record", "?" ]
storm_record
[ "CREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\n\"Dates_active\" text,\n\"Max_speed\" int,\n\"Damage_millions_USD\" real,\n\"Number_Deaths\" int,\nPRIMARY KEY (\"Storm_ID\")\n);", "CREATE TABLE \"region\" (\n`Region_id` int,\n`Region_code` text,\n`Region_name` text,\nPRIMARY KEY (\"Region_id\")\n);"...
How many regions do we have?
SELECT count(*) FROM region
[ "SELECT", "count", "(", "*", ")", "FROM", "region" ]
[ "select", "count", "(", "*", ")", "from", "region" ]
[ "How", "many", "regions", "do", "we", "have", "?" ]
storm_record
[ "CREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\n\"Dates_active\" text,\n\"Max_speed\" int,\n\"Damage_millions_USD\" real,\n\"Number_Deaths\" int,\nPRIMARY KEY (\"Storm_ID\")\n);", "CREATE TABLE \"region\" (\n`Region_id` int,\n`Region_code` text,\n`Region_name` text,\nPRIMARY KEY (\"Region_id\")\n);"...
Count the number of regions.
SELECT count(*) FROM region
[ "SELECT", "count", "(", "*", ")", "FROM", "region" ]
[ "select", "count", "(", "*", ")", "from", "region" ]
[ "Count", "the", "number", "of", "regions", "." ]
storm_record
[ "CREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\n\"Dates_active\" text,\n\"Max_speed\" int,\n\"Damage_millions_USD\" real,\n\"Number_Deaths\" int,\nPRIMARY KEY (\"Storm_ID\")\n);", "CREATE TABLE \"region\" (\n`Region_id` int,\n`Region_code` text,\n`Region_name` text,\nPRIMARY KEY (\"Region_id\")\n);"...
Show all region code and region name sorted by the codes.
SELECT region_code , region_name FROM region ORDER BY region_code
[ "SELECT", "region_code", ",", "region_name", "FROM", "region", "ORDER", "BY", "region_code" ]
[ "select", "region_code", ",", "region_name", "from", "region", "order", "by", "region_code" ]
[ "Show", "all", "region", "code", "and", "region", "name", "sorted", "by", "the", "codes", "." ]
storm_record
[ "CREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\n\"Dates_active\" text,\n\"Max_speed\" int,\n\"Damage_millions_USD\" real,\n\"Number_Deaths\" int,\nPRIMARY KEY (\"Storm_ID\")\n);", "CREATE TABLE \"region\" (\n`Region_id` int,\n`Region_code` text,\n`Region_name` text,\nPRIMARY KEY (\"Region_id\")\n);"...
What are the codes and names for all regions, sorted by codes?
SELECT region_code , region_name FROM region ORDER BY region_code
[ "SELECT", "region_code", ",", "region_name", "FROM", "region", "ORDER", "BY", "region_code" ]
[ "select", "region_code", ",", "region_name", "from", "region", "order", "by", "region_code" ]
[ "What", "are", "the", "codes", "and", "names", "for", "all", "regions", ",", "sorted", "by", "codes", "?" ]
storm_record
[ "CREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\n\"Dates_active\" text,\n\"Max_speed\" int,\n\"Damage_millions_USD\" real,\n\"Number_Deaths\" int,\nPRIMARY KEY (\"Storm_ID\")\n);", "CREATE TABLE \"region\" (\n`Region_id` int,\n`Region_code` text,\n`Region_name` text,\nPRIMARY KEY (\"Region_id\")\n);"...
List all region names in alphabetical order.
SELECT region_name FROM region ORDER BY region_name
[ "SELECT", "region_name", "FROM", "region", "ORDER", "BY", "region_name" ]
[ "select", "region_name", "from", "region", "order", "by", "region_name" ]
[ "List", "all", "region", "names", "in", "alphabetical", "order", "." ]
storm_record
[ "CREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\n\"Dates_active\" text,\n\"Max_speed\" int,\n\"Damage_millions_USD\" real,\n\"Number_Deaths\" int,\nPRIMARY KEY (\"Storm_ID\")\n);", "CREATE TABLE \"region\" (\n`Region_id` int,\n`Region_code` text,\n`Region_name` text,\nPRIMARY KEY (\"Region_id\")\n);"...
What are the names of the regions in alphabetical order?
SELECT region_name FROM region ORDER BY region_name
[ "SELECT", "region_name", "FROM", "region", "ORDER", "BY", "region_name" ]
[ "select", "region_name", "from", "region", "order", "by", "region_name" ]
[ "What", "are", "the", "names", "of", "the", "regions", "in", "alphabetical", "order", "?" ]
storm_record
[ "CREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\n\"Dates_active\" text,\n\"Max_speed\" int,\n\"Damage_millions_USD\" real,\n\"Number_Deaths\" int,\nPRIMARY KEY (\"Storm_ID\")\n);", "CREATE TABLE \"region\" (\n`Region_id` int,\n`Region_code` text,\n`Region_name` text,\nPRIMARY KEY (\"Region_id\")\n);"...
Show names for all regions except for Denmark.
SELECT region_name FROM region WHERE region_name != 'Denmark'
[ "SELECT", "region_name", "FROM", "region", "WHERE", "region_name", "!", "=", "'Denmark", "'" ]
[ "select", "region_name", "from", "region", "where", "region_name", "!", "=", "value" ]
[ "Show", "names", "for", "all", "regions", "except", "for", "Denmark", "." ]
storm_record
[ "CREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\n\"Dates_active\" text,\n\"Max_speed\" int,\n\"Damage_millions_USD\" real,\n\"Number_Deaths\" int,\nPRIMARY KEY (\"Storm_ID\")\n);", "CREATE TABLE \"region\" (\n`Region_id` int,\n`Region_code` text,\n`Region_name` text,\nPRIMARY KEY (\"Region_id\")\n);"...
Return the names of all regions other than Denmark.
SELECT region_name FROM region WHERE region_name != 'Denmark'
[ "SELECT", "region_name", "FROM", "region", "WHERE", "region_name", "!", "=", "'Denmark", "'" ]
[ "select", "region_name", "from", "region", "where", "region_name", "!", "=", "value" ]
[ "Return", "the", "names", "of", "all", "regions", "other", "than", "Denmark", "." ]
storm_record
[ "CREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\n\"Dates_active\" text,\n\"Max_speed\" int,\n\"Damage_millions_USD\" real,\n\"Number_Deaths\" int,\nPRIMARY KEY (\"Storm_ID\")\n);", "CREATE TABLE \"region\" (\n`Region_id` int,\n`Region_code` text,\n`Region_name` text,\nPRIMARY KEY (\"Region_id\")\n);"...
How many storms had death records?
SELECT count(*) FROM storm WHERE Number_Deaths > 0
[ "SELECT", "count", "(", "*", ")", "FROM", "storm", "WHERE", "Number_Deaths", ">", "0" ]
[ "select", "count", "(", "*", ")", "from", "storm", "where", "number_deaths", ">", "value" ]
[ "How", "many", "storms", "had", "death", "records", "?" ]
storm_record
[ "CREATE TABLE \"storm\" (\n\"Storm_ID\" int,\n\"Name\" text,\n\"Dates_active\" text,\n\"Max_speed\" int,\n\"Damage_millions_USD\" real,\n\"Number_Deaths\" int,\nPRIMARY KEY (\"Storm_ID\")\n);", "CREATE TABLE \"region\" (\n`Region_id` int,\n`Region_code` text,\n`Region_name` text,\nPRIMARY KEY (\"Region_id\")\n);"...
Count the number of storms in which at least 1 person died.
SELECT count(*) FROM storm WHERE Number_Deaths > 0
[ "SELECT", "count", "(", "*", ")", "FROM", "storm", "WHERE", "Number_Deaths", ">", "0" ]
[ "select", "count", "(", "*", ")", "from", "storm", "where", "number_deaths", ">", "value" ]
[ "Count", "the", "number", "of", "storms", "in", "which", "at", "least", "1", "person", "died", "." ]