Skip to content

Commit

Permalink
Merge branch 'main' into jp/update2
Browse files Browse the repository at this point in the history
  • Loading branch information
rishsriv authored Jun 24, 2024
2 parents 6492374 + 44c5a23 commit f75040b
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 37 deletions.
5 changes: 0 additions & 5 deletions data/questions_gen_bigquery.csv
Original file line number Diff line number Diff line change
Expand Up @@ -208,25 +208,20 @@ yelp,bigquery,table_join,"SELECT category.category_name FROM (SELECT business.bu
yelp,bigquery,instruct,SELECT COUNT(review.rid) AS total_reviews FROM yelp.review JOIN yelp.category ON review.business_id = category.business_id WHERE review.year = 2021 AND LOWER(category.category_name) LIKE '%Cafe%';,"What is the total number of reviews posted in the year 2021 for businesses in the category ""Cafe""?","Filter strings of users, city, address, business.name using LIKE with wildcards.
Filter strings of state using exact upper case matches.
Assume the rating of a business to be its average rating, and compute it before computing other aggregates on it.
Always truncate dates in the question to its current month and year (if applicable) before filtering on `review.year` and `review.month`.
"
yelp,bigquery,instruct,"SELECT AVG(sf.average_rating) AS sf_average_rating FROM (SELECT business.business_id, AVG(review.rating) AS average_rating FROM yelp.business JOIN yelp.review ON business.business_id = review.business_id WHERE LOWER(LOWER(business.city)) LIKE '%san francisco%' GROUP BY business.business_id) AS sf;",What is the average rating of businesses in the city of San Francisco?,"Filter strings of users, city, address, business.name using LIKE with wildcards.
Filter strings of state using exact upper case matches.
The rating of businesses in a city refers to the average rating of the businesses in that city. I.e., you must compute the average rating of each business before computing the average rating of businesses in the city.
Always truncate dates in the question to its current month and year (if applicable) before filtering on `review.year` and `review.month`.
"
yelp,bigquery,instruct,"SELECT review.business_id, COUNT(*) AS review_count FROM yelp.review WHERE review.year = 2021 GROUP BY review.business_id ORDER BY review_count DESC;",How many reviews were posted for each business id in the year 2021?,"Filter strings of users, city, address, business.name using LIKE with wildcards.
Filter strings of state using exact upper case matches.
Assume the rating of a business to be its average rating, and compute it before computing other aggregates on it.
Always truncate dates in the question to its current month and year (if applicable) before filtering on `review.year` and `review.month`.
"
yelp,bigquery,instruct,SELECT COUNT(*) FROM yelp.review JOIN yelp.users ON review.user_id = users.user_id WHERE LOWER(users.name) LIKE '%Sarah Williams%' AND review.month = 'April' AND review.year = 2021;,"How many reviews were posted by users with the name ""Sarah Williams"" in the month of April 2021?","Filter strings of users, city, address, business.name using LIKE with wildcards.
Filter strings of state using exact upper case matches.
Assume the rating of a business to be its average rating, and compute it before computing other aggregates on it.
Always truncate dates in the question to its current month and year (if applicable) before filtering on `review.year` and `review.month`.
"
yelp,bigquery,instruct,SELECT SUM(checkin.count) AS total_checkins FROM yelp.business JOIN yelp.checkin ON business.business_id = checkin.business_id WHERE business.state = 'CA' AND LOWER(checkin.day) LIKE '%Monday%';,How many check-ins occurred on Mondays at businesses in the state of California?,"Filter strings of users, city, address, business.name using LIKE with wildcards.
Filter strings of state using exact upper case matches.
Assume the rating of a business to be its average rating, and compute it before computing other aggregates on it.
Always truncate dates in the question to its current month and year (if applicable) before filtering on `review.year` and `review.month`.
"
5 changes: 0 additions & 5 deletions data/questions_gen_mysql.csv
Original file line number Diff line number Diff line change
Expand Up @@ -208,25 +208,20 @@ yelp,mysql,table_join,"SELECT category.category_name FROM (SELECT business.busin
yelp,mysql,instruct,SELECT COUNT(review.rid) AS total_reviews FROM review JOIN category ON review.business_id = category.business_id WHERE review.year = 2021 AND LOWER(category.category_name) LIKE '%Cafe%',"What is the total number of reviews posted in the year 2021 for businesses in the category ""Cafe""?","Filter strings of users, city, address, business.name using ILIKE with wildcards.
Filter strings of state using exact upper case matches.
Assume the rating of a business to be its average rating, and compute it before computing other aggregates on it.
Always truncate dates in the question to its current month and year (if applicable) before filtering on `review.year` and `review.month`.
"
yelp,mysql,instruct,"SELECT AVG(sf.average_rating) AS sf_average_rating FROM (SELECT business.business_id, AVG(review.rating) AS average_rating FROM business JOIN review ON business.business_id = review.business_id WHERE LOWER(LOWER(business.city)) LIKE '%san francisco%' GROUP BY business.business_id) AS sf",What is the average rating of businesses in the city of San Francisco?,"Filter strings of users, city, address, business.name using ILIKE with wildcards.
Filter strings of state using exact upper case matches.
The rating of businesses in a city refers to the average rating of the businesses in that city. I.e., you must compute the average rating of each business before computing the average rating of businesses in the city.
Always truncate dates in the question to its current month and year (if applicable) before filtering on `review.year` and `review.month`.
"
yelp,mysql,instruct,"SELECT review.business_id, COUNT(*) AS review_count FROM review WHERE review.year = 2021 GROUP BY review.business_id ORDER BY review_count DESC",How many reviews were posted for each business id in the year 2021?,"Filter strings of users, city, address, business.name using ILIKE with wildcards.
Filter strings of state using exact upper case matches.
Assume the rating of a business to be its average rating, and compute it before computing other aggregates on it.
Always truncate dates in the question to its current month and year (if applicable) before filtering on `review.year` and `review.month`.
"
yelp,mysql,instruct,SELECT COUNT(*) FROM review JOIN users ON review.user_id = users.user_id WHERE LOWER(users.name) LIKE '%Sarah Williams%' AND review.month = 'April' AND review.year = 2021,"How many reviews were posted by users with the name ""Sarah Williams"" in the month of April 2021?","Filter strings of users, city, address, business.name using ILIKE with wildcards.
Filter strings of state using exact upper case matches.
Assume the rating of a business to be its average rating, and compute it before computing other aggregates on it.
Always truncate dates in the question to its current month and year (if applicable) before filtering on `review.year` and `review.month`.
"
yelp,mysql,instruct,SELECT SUM(checkin.count) AS total_checkins FROM business JOIN checkin ON business.business_id = checkin.business_id WHERE business.state = 'CA' AND LOWER(checkin.day) LIKE '%Monday%',How many check-ins occurred on Mondays at businesses in the state of California?,"Filter strings of users, city, address, business.name using ILIKE with wildcards.
Filter strings of state using exact upper case matches.
Assume the rating of a business to be its average rating, and compute it before computing other aggregates on it.
Always truncate dates in the question to its current month and year (if applicable) before filtering on `review.year` and `review.month`.
"
Loading

0 comments on commit f75040b

Please sign in to comment.