Practice Interview Questions
| Question | Status |
|---|---|
You are provided with a table called yelp_reviews that contains reviews. Each review has several columns, including the business name, the review text, and the number of 'funny' votes it received. Your task is to write a query that finds the review text with the highest number of 'funny' votes and outputs the business name along with the review text.
yelp_reviews table:
| Column Name | Description |
|---|---|
| business_name | Name of the business |
| review_id | Unique identifier for the review |
| user_id | ID of the user who submitted the review |
| stars | Number of stars given in the review |
| review_date |
You are provided with a table called yelp_reviews that contains reviews. Each review has several columns, including the business name, the review text, and the number of 'funny' votes it received. Your task is to write a query that finds the review text with the highest number of 'funny' votes and outputs the business name along with the review text.
yelp_reviews table:
| Column Name | Description |
|---|---|
| business_name | Name of the business |
| review_id | Unique identifier for the review |
| user_id | ID of the user who submitted the review |
| stars | Number of stars given in the review |
| review_date |
| Date when the review was posted |
| review_text | The text of the review |
| funny | Number of 'funny' votes |
| useful | Number of 'useful' votes |
| cool | Number of 'cool' votes |
Example Output
| review_text | business_name |
|---|---|
| The burger was so good, I almost started clapping when I finished it | Burger Heaven |
| Date when the review was posted |
| review_text | The text of the review |
| funny | Number of 'funny' votes |
| useful | Number of 'useful' votes |
| cool | Number of 'cool' votes |
Example Output
| review_text | business_name |
|---|---|
| The burger was so good, I almost started clapping when I finished it | Burger Heaven |