Skip to content

Commit

Permalink
modified question for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
rishsriv committed Jun 25, 2024
1 parent 3144a4e commit 22ae3dc
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions data/questions_gen_bigquery.csv
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ restaurants,bigquery,table_join,"SELECT location.city_name, AVG(restaurant.ratin
restaurants,bigquery,table_join,"SELECT geographic.region, AVG(restaurant.rating) AS average_rating FROM restaurants.geographic JOIN restaurants.restaurant ON geographic.city_name = restaurant.city_name GROUP BY 1;",What is the average rating of restaurants in each region?,
restaurants,bigquery,table_join,"SELECT geographic.region, COUNT(restaurant.id) AS number_of_restaurants FROM restaurants.restaurant JOIN restaurants.geographic ON restaurant.city_name = geographic.city_name WHERE LOWER(restaurant.food_type) LIKE '%italian%' GROUP BY geographic.region ORDER BY number_of_restaurants DESC;",How many restaurants serve Italian food in each region?,
restaurants,bigquery,table_join,"SELECT geographic.region, COUNT(DISTINCT restaurant.id) AS number_of_restaurants FROM restaurants.geographic JOIN restaurants.restaurant ON geographic.city_name = restaurant.city_name GROUP BY geographic.region ORDER BY number_of_restaurants DESC NULLS FIRST;SELECT geographic.region, COUNT(DISTINCT restaurant.id) AS number_of_restaurants FROM restaurants.geographic LEFT JOIN restaurants.restaurant ON geographic.city_name = restaurant.city_name GROUP BY geographic.region ORDER BY number_of_restaurants DESC NULLS FIRST;",How many restaurants are there in each region?,
restaurants,bigquery,instruct,SELECT DISTINCT restaurant.city_name FROM restaurants.restaurant WHERE rating = (SELECT MAX(rating) FROM restaurants.restaurant);,Which city has the highest-rated restaurant?,Match all strings case-insensitively
restaurants,bigquery,instruct,"SELECT restaurant.name, restaurant.rating FROM restaurants.restaurant WHERE restaurant.rating > 4 AND LOWER(restaurant.city_name) LIKE '%New York%';",What's the name and rating of all the restaurants that have a rating greater than 4 and are located in the city of New York?,Match all strings case-insensitively
restaurants,bigquery,instruct,"SELECT restaurant.name, restaurant.food_type FROM restaurants.restaurant JOIN restaurants.location ON restaurant.id = location.restaurant_id WHERE LOWER(location.street_name) LIKE '%market st%' AND LOWER(location.city_name) LIKE '%san francisco%';",What's the name and food type of all the restaurants located on Market St in San Francisco?,Match all strings case-insensitively
restaurants,bigquery,instruct,SELECT restaurant.name FROM restaurants.restaurant WHERE LOWER(LOWER(restaurant.food_type)) LIKE '%italian%';,What are the names of the restaurants that serve Italian food?,Match all strings case-insensitively
restaurants,bigquery,instruct,SELECT DISTINCT restaurant.name FROM restaurants.restaurant WHERE LOWER(restaurant.city_name) LIKE '%Los Angeles%' AND restaurant.rating > 4 ORDER BY restaurant.name NULLS LAST;,What are the names of the restaurants in Los Angeles that have a rating higher than 4?,Match all strings case-insensitively
restaurants,bigquery,instruct,SELECT DISTINCT restaurant.city_name FROM restaurants.restaurant WHERE rating = (SELECT MAX(rating) FROM restaurants.restaurant);,Which city has the highest-rated restaurant?,Match all strings case-insensitively using wildcard operators
restaurants,bigquery,instruct,"SELECT restaurant.name, restaurant.rating FROM restaurants.restaurant WHERE restaurant.rating > 4 AND LOWER(restaurant.city_name) LIKE '%New York%';",What's the name and rating of all the restaurants that have a rating greater than 4 and are located in the city of New York?,Match all strings case-insensitively using wildcard operators
restaurants,bigquery,instruct,"SELECT restaurant.name, restaurant.food_type FROM restaurants.restaurant JOIN restaurants.location ON restaurant.id = location.restaurant_id WHERE LOWER(location.street_name) LIKE '%market st%' AND LOWER(location.city_name) LIKE '%san francisco%';",What's the name and food type of all the restaurants located on Market St in San Francisco?,Match all strings case-insensitively using wildcard operators
restaurants,bigquery,instruct,SELECT restaurant.name FROM restaurants.restaurant WHERE LOWER(LOWER(restaurant.food_type)) LIKE '%italian%';,What are the names of the restaurants that serve Italian food?,Match all strings case-insensitively using wildcard operators
restaurants,bigquery,instruct,SELECT DISTINCT restaurant.name FROM restaurants.restaurant WHERE LOWER(restaurant.city_name) LIKE '%Los Angeles%' AND restaurant.rating > 4 ORDER BY restaurant.name NULLS LAST;,What are the names of the restaurants in Los Angeles that have a rating higher than 4?,Match all strings case-insensitively using wildcard operators
scholar,bigquery,date_functions,SELECT COUNT(DISTINCT w.authorid) AS num_authors FROM scholar.paper AS p JOIN scholar.writes AS w ON p.paperid = w.paperid WHERE p.year < EXTRACT(YEAR FROM CURRENT_DATE - INTERVAL '1' YEAR);,How many authors have written a paper that was published 1 year or longer before today's date?,
scholar,bigquery,date_functions,SELECT COUNT(DISTINCT pk.keyphraseid) AS num_keyphrases FROM scholar.paper AS p JOIN scholar.paperkeyphrase AS pk ON p.paperid = pk.paperid WHERE p.year >= 2020 AND p.year <= 2035;,How many keyphrases are associated with papers published between 2020 and 2035?,
scholar,bigquery,date_functions,"SELECT YEAR, COUNT(*) AS num_papers FROM scholar.paper WHERE YEAR <> 2025 - 6 GROUP BY YEAR ORDER BY YEAR NULLS LAST;",What's the number of papers published per year excluding those published in the year that is 6 years before 2025?,
Expand Down
10 changes: 5 additions & 5 deletions data/questions_gen_mysql.csv
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ restaurants,mysql,table_join,"SELECT location.city_name, AVG(restaurant.rating)
restaurants,mysql,table_join,"SELECT geographic.region, AVG(restaurant.rating) AS average_rating FROM geographic JOIN restaurant ON geographic.city_name = restaurant.city_name GROUP BY 1",What is the average rating of restaurants in each region?,
restaurants,mysql,table_join,"SELECT geographic.region, COUNT(restaurant.id) AS number_of_restaurants FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name WHERE LOWER(restaurant.food_type) LIKE '%italian%' GROUP BY geographic.region ORDER BY number_of_restaurants DESC",How many restaurants serve Italian food in each region?,
restaurants,mysql,table_join,"SELECT geographic.region, COUNT(DISTINCT restaurant.id) AS number_of_restaurants FROM geographic JOIN restaurant ON geographic.city_name = restaurant.city_name GROUP BY geographic.region ORDER BY CASE WHEN number_of_restaurants IS NULL THEN 1 ELSE 0 END DESC, number_of_restaurants DESC;SELECT geographic.region, COUNT(DISTINCT restaurant.id) AS number_of_restaurants FROM geographic LEFT JOIN restaurant ON geographic.city_name = restaurant.city_name GROUP BY geographic.region ORDER BY CASE WHEN number_of_restaurants IS NULL THEN 1 ELSE 0 END DESC, number_of_restaurants DESC",How many restaurants are there in each region?,
restaurants,mysql,instruct,SELECT DISTINCT restaurant.city_name FROM restaurant WHERE rating = (SELECT MAX(rating) FROM restaurant),Which city has the highest-rated restaurant?,Match all strings case-insensitively
restaurants,mysql,instruct,"SELECT restaurant.name, restaurant.rating FROM restaurant WHERE restaurant.rating > 4 AND LOWER(restaurant.city_name) LIKE '%New York%'",What's the name and rating of all the restaurants that have a rating greater than 4 and are located in the city of New York?,Match all strings case-insensitively
restaurants,mysql,instruct,"SELECT restaurant.name, restaurant.food_type FROM restaurant JOIN LOCATION ON restaurant.id = location.restaurant_id WHERE LOWER(location.street_name) LIKE '%Market St%' AND LOWER(location.city_name) LIKE '%San Francisco%'",What's the name and food type of all the restaurants located on Market St in San Francisco?,Match all strings case-insensitively
restaurants,mysql,instruct,SELECT restaurant.name FROM restaurant WHERE LOWER(LOWER(restaurant.food_type)) LIKE '%italian%',What are the names of the restaurants that serve Italian food?,Match all strings case-insensitively
restaurants,mysql,instruct,"SELECT DISTINCT restaurant.name FROM restaurant WHERE LOWER(restaurant.city_name) LIKE '%Los Angeles%' AND restaurant.rating > 4 ORDER BY CASE WHEN restaurant.name IS NULL THEN 1 ELSE 0 END, restaurant.name",What are the names of the restaurants in Los Angeles that have a rating higher than 4?,Match all strings case-insensitively
restaurants,mysql,instruct,SELECT DISTINCT restaurant.city_name FROM restaurant WHERE rating = (SELECT MAX(rating) FROM restaurant),Which city has the highest-rated restaurant?,Match all strings case-insensitively using wildcard operators
restaurants,mysql,instruct,"SELECT restaurant.name, restaurant.rating FROM restaurant WHERE restaurant.rating > 4 AND LOWER(restaurant.city_name) LIKE '%New York%'",What's the name and rating of all the restaurants that have a rating greater than 4 and are located in the city of New York?,Match all strings case-insensitively using wildcard operators
restaurants,mysql,instruct,"SELECT restaurant.name, restaurant.food_type FROM restaurant JOIN LOCATION ON restaurant.id = location.restaurant_id WHERE LOWER(location.street_name) LIKE '%Market St%' AND LOWER(location.city_name) LIKE '%San Francisco%'",What's the name and food type of all the restaurants located on Market St in San Francisco?,Match all strings case-insensitively using wildcard operators
restaurants,mysql,instruct,SELECT restaurant.name FROM restaurant WHERE LOWER(LOWER(restaurant.food_type)) LIKE '%italian%',What are the names of the restaurants that serve Italian food?,Match all strings case-insensitively using wildcard operators
restaurants,mysql,instruct,"SELECT DISTINCT restaurant.name FROM restaurant WHERE LOWER(restaurant.city_name) LIKE '%Los Angeles%' AND restaurant.rating > 4 ORDER BY CASE WHEN restaurant.name IS NULL THEN 1 ELSE 0 END, restaurant.name",What are the names of the restaurants in Los Angeles that have a rating higher than 4?,Match all strings case-insensitively using wildcard operators
scholar,mysql,date_functions,SELECT COUNT(DISTINCT w.authorid) AS num_authors FROM paper AS p JOIN writes AS w ON p.paperid = w.paperid WHERE p.year < EXTRACT(YEAR FROM CURRENT_DATE - INTERVAL '1' YEAR),How many authors have written a paper that was published 1 year or longer before today's date?,
scholar,mysql,date_functions,SELECT COUNT(DISTINCT pk.keyphraseid) AS num_keyphrases FROM paper AS p JOIN paperkeyphrase AS pk ON p.paperid = pk.paperid WHERE p.year >= 2020 AND p.year <= 2035,How many keyphrases are associated with papers published between 2020 and 2035?,
scholar,mysql,date_functions,"SELECT YEAR, COUNT(*) AS num_papers FROM paper WHERE YEAR <> 2025 - 6 GROUP BY YEAR ORDER BY CASE WHEN YEAR IS NULL THEN 1 ELSE 0 END, YEAR",What's the number of papers published per year excluding those published in the year that is 6 years before 2025?,
Expand Down
10 changes: 5 additions & 5 deletions data/questions_gen_postgres.csv
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ What is the average rating of restaurants that serve Mexican food in each city?,
What is the average rating of restaurants in each region?,"SELECT geographic.region, AVG(restaurant.rating) AS average_rating FROM geographic JOIN restaurant ON geographic.city_name=restaurant.city_name GROUP BY 1;",restaurants,table_join,
How many restaurants serve Italian food in each region?,"SELECT geographic.region, COUNT(restaurant.id) AS number_of_restaurants FROM restaurant JOIN geographic ON restaurant.city_name = geographic.city_name WHERE LOWER(restaurant.food_type) LIKE '%italian%' GROUP BY geographic.region ORDER BY number_of_restaurants DESC NULLS LAST;",restaurants,table_join,
How many restaurants are there in each region?,"SELECT geographic.region, COUNT(DISTINCT restaurant.id) AS number_of_restaurants FROM geographic JOIN restaurant ON geographic.city_name = restaurant.city_name GROUP BY geographic.region ORDER BY number_of_restaurants DESC;SELECT geographic.region, COUNT(DISTINCT restaurant.id) AS number_of_restaurants FROM geographic LEFT JOIN restaurant ON geographic.city_name = restaurant.city_name GROUP BY geographic.region ORDER BY number_of_restaurants DESC;",restaurants,table_join,
Which city has the highest-rated restaurant?,SELECT DISTINCT restaurant.city_name FROM restaurant WHERE rating=(SELECT MAX(rating) FROM restaurant);,restaurants,instruct,Match all strings case-insensitively
What's the name and rating of all the restaurants that have a rating greater than 4 and are located in the city of New York?,"SELECT restaurant.name, restaurant.rating FROM restaurant WHERE restaurant.rating > 4 AND restaurant.city_name ILIKE '%New York%';",restaurants,instruct,Match all strings case-insensitively
What's the name and food type of all the restaurants located on Market St in San Francisco?,"SELECT restaurant.name, restaurant.food_type FROM restaurant JOIN LOCATION ON restaurant.id = location.restaurant_id WHERE location.street_name ILIKE '%Market St%' AND location.city_name ILIKE '%San Francisco%';",restaurants,instruct,Match all strings case-insensitively
What are the names of the restaurants that serve Italian food?,SELECT restaurant.name FROM restaurant WHERE LOWER(restaurant.food_type) ILIKE '%italian%';,restaurants,instruct,Match all strings case-insensitively
What are the names of the restaurants in Los Angeles that have a rating higher than 4?,SELECT DISTINCT restaurant.name FROM restaurant WHERE restaurant.city_name ILIKE '%Los Angeles%' AND restaurant.rating > 4 ORDER BY restaurant.name NULLS LAST;,restaurants,instruct,Match all strings case-insensitively
Which city has the highest-rated restaurant?,SELECT DISTINCT restaurant.city_name FROM restaurant WHERE rating=(SELECT MAX(rating) FROM restaurant);,restaurants,instruct,Match all strings case-insensitively using wildcard operators
What's the name and rating of all the restaurants that have a rating greater than 4 and are located in the city of New York?,"SELECT restaurant.name, restaurant.rating FROM restaurant WHERE restaurant.rating > 4 AND restaurant.city_name ILIKE '%New York%';",restaurants,instruct,Match all strings case-insensitively using wildcard operators
What's the name and food type of all the restaurants located on Market St in San Francisco?,"SELECT restaurant.name, restaurant.food_type FROM restaurant JOIN LOCATION ON restaurant.id = location.restaurant_id WHERE location.street_name ILIKE '%Market St%' AND location.city_name ILIKE '%San Francisco%';",restaurants,instruct,Match all strings case-insensitively using wildcard operators
What are the names of the restaurants that serve Italian food?,SELECT restaurant.name FROM restaurant WHERE LOWER(restaurant.food_type) ILIKE '%italian%';,restaurants,instruct,Match all strings case-insensitively using wildcard operators
What are the names of the restaurants in Los Angeles that have a rating higher than 4?,SELECT DISTINCT restaurant.name FROM restaurant WHERE restaurant.city_name ILIKE '%Los Angeles%' AND restaurant.rating > 4 ORDER BY restaurant.name NULLS LAST;,restaurants,instruct,Match all strings case-insensitively using wildcard operators
What is the total number of papers published per year?,"SELECT paper.year, COUNT(paper.paperid) AS total_papers FROM paper GROUP BY paper.year ORDER BY paper.year NULLS LAST;",scholar,group_by,
What is the total number of papers published in each year?,"SELECT paper.year, COUNT(paper.paperid) AS total_papers FROM paper GROUP BY paper.year ORDER BY paper.year;",scholar,group_by,
What is the total number of papers associated with each dataset?,"SELECT paperdataset.datasetid, COUNT(DISTINCT paperdataset.paperid) AS total_papers FROM paperdataset GROUP BY paperdataset.datasetid;SELECT dataset.datasetname, COUNT(paperdataset.paperid) AS total_papers FROM paperdataset JOIN dataset ON paperdataset.datasetid = dataset.datasetid GROUP BY dataset.datasetname;",scholar,group_by,
Expand Down
Loading

0 comments on commit 22ae3dc

Please sign in to comment.