Chinastark/bird_dataset huggingface dataset:
Database: public_review_platform
Question: Find the Yelp user with the average 5-star rating of all reviews who has been yelping the longest.
Evidence: Yelp user refers to user_id; average 5-star rating refers to user_average_stars = 5; yelping the longest refers to min(user_yelping_since_year)
SQL: SELECT user_id FROM Users WHERE user_average_stars = 5 ORDER BY user_yelping_since_year ASC LIMIT 1
Database: public_review_platform
Question: Identify the operating hours of businesses in Black Canyon City with review count greater than average.
Evidence: operating hours refers to opening_time closing_time on day_id; in Black Canyon City refers to city = 'Black Canyon City'; greater than average refers to review_count > AVG(T1.review_count)
SQL: SELECT T2.opening_time, T2.closing_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city = 'Black Canyon City' GROUP BY t2.business_id HAVING T1.review_count > AVG(T1.review_count)
Database: public_review_platform
Question: Among all the users who received the high number of compliments, what percent received the 'cute' type of compliment.
Evidence: high number of compliments refers to number_of_compliments = 'High'; percentage = divide(count(user_id where compliment_type = 'cute'), count(user_id))*100%
SQL: SELECT CAST(SUM(CASE WHEN T1.compliment_type = 'cute' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.user_id) FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T2.number_of_compliments = 'High'
Database: public_review_platform
Question: Mention the number of businesses that have no any attribute.
Evidence: have no attribute refers to attribute_value in( 'none', 'no', 'false')
SQL: SELECT COUNT(business_id) FROM Business_Attributes WHERE attribute_value IN ('none', 'no', 'false')
Database: public_review_platform
Question: What are the opening and closing time of business id 1 for day id 2?
Evidence: false
SQL: SELECT opening_time, closing_time FROM Business_Hours WHERE business_id = 1 AND day_id = 2
Database: public_review_platform
Question: List out city name of businesses which have medium length of review.
Evidence: medium length of review refers to review_length = 'Medium'
SQL: SELECT DISTINCT T1.city FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T2.review_length = 'Medium'
Database: public_review_platform
Question: What is the closing time of business id 4 on Sunday?
Evidence: on Sunday refers to day_of_week = 'Sunday'
SQL: SELECT T2.closing_time FROM Days AS T1 INNER JOIN Business_Hours AS T2 ON T1.day_id = T2.day_id WHERE T1.day_of_week = 'Sunday' AND T2.business_id = 4
Database: public_review_platform
Question: Among the businesses which have short length of review, which one located in Phoenix?
Evidence: short length of review refers to review_length = 'Short'; in Phoenix refers to city = 'Phoenix'
SQL: SELECT DISTINCT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Phoenix' AND T2.review_length = 'Short'
Database: public_review_platform
Question: Among the users whose fan is medium, how many users received high compliments from other users.
Evidence: is medium refers to user_fans = 'Medium'; high compliments refers to number_of_compliments = 'High'
SQL: SELECT COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Users_Compliments AS T2 ON T1.user_id = T2.user_id WHERE T2.number_of_compliments = 'High' AND T1.user_fans = 'Medium'
Database: public_review_platform
Question: Among the users who received low compliments from other users, which users joined Yelp in 2012?
Evidence: low compliments refers to number_of_compliments = 'Low'; joined Yelp in 2012 refers to user_yelping_since_year = 2012
SQL: SELECT DISTINCT T2.user_id FROM Users AS T1 INNER JOIN Users_Compliments AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = 2012 AND T2.number_of_compliments = 'Low'
Database: public_review_platform
Question: Among the businesses without attribute, how many businesses located in Gilbert?
Evidence: without attribute refers to attribute_value = 'None'; in Gilbert refers to city = 'Gilbert'
SQL: SELECT COUNT(T2.business_id) FROM Business_Attributes AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T2.city = 'Gilbert' AND T1.attribute_value IN ('None', 'no', 'false')
Database: public_review_platform
Question: Among the businesses with average rating, how many business has attribute of full_bar.
Evidence: average rating refers to avg(stars); attribute of full_bar refers to attribute_value = 'full_bar'
SQL: SELECT COUNT(T1.business_id) FROM Business_Attributes AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.attribute_value = 'full_bar'
Database: public_review_platform
Question: List out the state of businesses which have opening time at 1AM.
Evidence: state refers to city
SQL: SELECT DISTINCT T1.state FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T2.opening_time = '1AM'
Database: public_review_platform
Question: List out the category name of business id 5.
SQL: SELECT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T2.business_id = 5
Database: public_review_platform
Question: List out the user id that has compliment type of photos.
Evidence: compliment type of photos refers to compliment_type = 'photos'
SQL: SELECT T2.user_id FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T1.compliment_type = 'photos'
Database: public_review_platform
Question: Calculate the percentage of medium tip length in the list. List out the time when users of medium tip length join Yelp.
Evidence: medium tip length refers to tip_length = 'Medium'; percentage = divide(count(tips where tip_length = 'Medium'), count(tips))*100%; the time when users join Yelp refers to user_yelping_since_year
SQL: SELECT CAST(SUM(CASE WHEN T1.tip_length = 'Medium' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.tip_length), T2.user_yelping_since_year FROM Tips AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id
Database: public_review_platform
Question: Calculate the percentage of businesses who located in Mesa. What is attribute value of these businesses.
Evidence: percentage = divide(count(business where city = 'Mesa'), count(business)) * 100%
SQL: SELECT CAST(COUNT(T1.city) AS REAL) * 100 / ( SELECT COUNT(business_id) FROM Business ), T2.attribute_value FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Mesa'
Database: public_review_platform
Question: State the state of businesses which have closing time at 12AM.
Evidence: state refers to city
SQL: SELECT DISTINCT T1.state FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T2.closing_time = '12AM'
Database: public_review_platform
Question: Among the businesses which have attribute of beer_and_wine, how many business located in Peoria?
Evidence: attribute of beer_and_wine refers to attribute_value = 'beer_and_wine'; in Peoria refers to city = 'Peoria'
SQL: SELECT COUNT(T1.business_id) FROM Business_Attributes AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T2.city = 'Peoria' AND T1.attribute_value = 'beer_and_wine'
Database: public_review_platform
Question: Among the users who received high compliments from other users, which users joined Yelp earliest?
Evidence: high compliments refers to number_of_compliments = ' High'; joined Yelp earliest refers to min(user_yelping_since_year)
SQL: SELECT T2.user_id FROM Users AS T1 INNER JOIN Users_Compliments AS T2 ON T1.user_id = T2.user_id WHERE T2.number_of_compliments = 'High' AND T1.user_yelping_since_year = ( SELECT MIN(user_yelping_since_year) FROM Users )
Database: public_review_platform
Question: Which business ID has the most reviews?
Evidence: the most reviews refer to MAX(user_id);
SQL: SELECT business_id FROM Reviews GROUP BY business_id ORDER BY COUNT(user_id) DESC LIMIT 1
Database: public_review_platform
Question: Which year has the most elite users?
Evidence: year has the most elite users refers to year_id with MAX(user_id);
SQL: SELECT year_id FROM Elite GROUP BY year_id ORDER BY COUNT(user_id) DESC LIMIT 1
Database: public_review_platform
Question: How many 5 star businesses have uber review votes for funny?
Evidence: businesses refer to business_id; review_stars = 5.0; review_votes_funny = 'uber';
SQL: SELECT COUNT(business_id) FROM Reviews WHERE review_stars = 5 AND review_votes_funny = 'Uber'
Database: public_review_platform
Question: How many users have uber review votes for funny from the fans?
Evidence: users refer to user_id; review_votes_funny = 'uber';
SQL: SELECT COUNT(DISTINCT user_id) FROM Reviews WHERE review_votes_funny = 'Uber'
Database: public_review_platform
Question: Which business ID have the shortest business operating hours?
Evidence: the shortest business operating hours refer to MIN(SUBTRACT(closing_time, opening_time));
SQL: SELECT business_id FROM Business_Hours ORDER BY closing_time - opening_time LIMIT 1
Database: public_review_platform
Question: Find out which business ID are opened all the time.
Evidence: opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time;
SQL: SELECT DISTINCT business_id FROM Business_Hours WHERE day_id >= 1 AND day_id < 8 AND opening_time = closing_time
Database: public_review_platform
Question: Does the length of the tip influence the number of likes for hotel and travel business category?
Evidence: the longer the tip_length, the lesser the likes OR the longer the tip length the higher the likes; hotel and travel business category refers to category_name = 'Hotels & Travel';
SQL: SELECT T3.tip_length, SUM(T3.likes) AS likes FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Tips AS T3 ON T2.business_id = T3.business_id WHERE T1.category_name = 'Hotels & Travel' GROUP BY T3.tip_length
Database: public_review_platform
Question: How many users manage to get uber votes for all of the review category? Find out what are the user average star.
Evidence: users refer to user_id; uber votes for all of the review category refer to review_votes_funny = 'uber' AND review_votes_useful = 'uber' AND review_votes_cool = 'uber';
SQL: SELECT COUNT(T2.user_id) AS USER_IDS, T2.user_average_stars FROM Reviews AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.review_votes_funny = 'Uber' AND T1.review_votes_useful = 'Uber' AND T1.review_votes_cool = 'Uber'
Database: public_review_platform
Question: What is the ratio of good to bad business star for a businesses that are opened all the time?
Evidence: opened all the time refers to Business_Hours where day_id BETWEEN 1 and 7 and opening_time = closing_time; ratio can be computed as DIVIDE(COUNT(stars BETWEEN 3.5 and 5), COUNT(stars BETWEEN 1 and 2.5));
SQL: SELECT CAST(SUM(CASE WHEN T1.stars BETWEEN 3.5 AND 5 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.stars BETWEEN 1 AND 2.5 THEN 1 ELSE 0 END) AS ratio FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id
Database: public_review_platform
Question: List out 10 business ID that are being reviewed the most by users and list out what are top 3 business categories.
Evidence: being reviewed the most refers to MAX(user_id); business categories refer to category_name;
SQL: SELECT T2.business_id, T3.category_name FROM Reviews AS T1 INNER JOIN Business_categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id GROUP BY T2.business_id ORDER BY COUNT(T1.user_id) DESC LIMIT 10
Database: public_review_platform
Question: How many businesses in Arizona having an average review less than 3 stars?
Evidence: businesses in Arizona refer to business_id where state = 'Arizona'; average review less than 3 stars refers to AVG(review_stars) < 3.0;
SQL: SELECT COUNT(business_id) FROM Business WHERE business_id IN ( SELECT DISTINCT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.state = 'AZ' GROUP BY T1.business_id HAVING SUM(T2.review_stars) / COUNT(T2.user_id) < 3 )
Database: public_review_platform
Question: What is the percentage of user not becoming an elite user?
Evidence: DIVIDE(SUBTRACT(COUNT(user_id), COUNT(Elite.user_id)), COUNT(user_id)) as percentage;
SQL: SELECT CAST((( SELECT COUNT(user_id) FROM Users ) - ( SELECT COUNT(DISTINCT user_id) FROM Elite )) AS REAL) * 100 / ( SELECT COUNT(user_id) FROM Users )
Database: public_review_platform
Question: What are the most common compliments types received by user with uber number of fans?
Evidence: the most common compliments types refer to MAX(COUNT(compliment_id)); user_fans = 'uber';
SQL: SELECT DISTINCT T3.compliment_type FROM Users AS T1 INNER JOIN Users_Compliments AS T2 ON T1.user_id = T2.user_id INNER JOIN Compliments AS T3 ON T2.compliment_id = T3.compliment_id WHERE T1.user_fans = 'Uber'
Database: public_review_platform
Question: What is the average year needed by a user with uber fans to become an elite user?
Evidence: AVG(user_yelping_since_year) where user_fans = 'uber';
SQL: SELECT CAST(SUM(T2.year_id - T1.user_yelping_since_year) AS REAL) / COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id WHERE T1.user_fans = 'Uber'
Database: public_review_platform
Question: What is the average year for a user to be upgraded to elite user?
Evidence: AVG(user_yelping_since_year) where user_id from Elite;
SQL: SELECT CAST(SUM(T2.year_id - T1.user_yelping_since_year) AS REAL) / COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id
Database: public_review_platform
Question: How many business are opened for more than 8 hour in Mesa and what is the percentage of the active businesses?
Evidence: business are opened for more than 8 hours refer to business_id where SUBTRACT(closing_time, opening_time) > 8; DIVIDE(COUNT(business_id where active = 'true' and city = 'Mesa' and SUBTRACT(closing_time, opening_time) > 8), COUNT(business_id where city = 'Mesa' and SUBTRACT(closing_time, opening_time) > 8)) as percentage;
SQL: SELECT CAST(SUM(CASE WHEN T1.active = 'true' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.business_id) AS ACT FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Mesa'
Database: public_review_platform
Question: How many active businesses are opened during late afternoon in the Phoenix city? List out the top 3 categories name for these businesses.
Evidence: opened during late afternoon refers to Business_Hours where opening_time ≥ '5PM'; active businesses refer to business_id where active = 'true';
SQL: SELECT DISTINCT T4.category_name FROM Business_Hours AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T2.active = 'true' AND T2.city = 'Phoenix' AND T1.opening_time >= '5PM' LIMIT 3
Database: public_review_platform
Question: Which user has done the most review on a business attributed to delivery?
Evidence: the most reviews refer to MAX(business_id) where attribute_name = 'Delivery';
SQL: SELECT T3.user_id FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Reviews AS T3 ON T2.business_id = T3.business_id WHERE T1.attribute_name = 'Delivery' GROUP BY T3.user_id ORDER BY COUNT(T2.business_id) DESC LIMIT 1
Database: public_review_platform
Question: What is the average number of reviews written for active businesses that operate not more than 30 hours a week?
Evidence: avg(user_id) where active = 'true' and SUM(SUBTRACT(closing_time, opening_time)) < 30;
SQL: SELECT AVG(T3.user_id) FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Reviews AS T3 ON T1.business_id = T3.business_id WHERE T1.active = 'true' GROUP BY T2.closing_time - T2.opening_time HAVING SUM(T2.closing_time - T2.opening_time) < 30
Database: public_review_platform
Question: How many business ids have opening hours from 8AM to 6PM?
Evidence: opening hours from 8AM to 6PM refer to Business_Hours where opening_time = '8AM' and closing_time = '6PM';
SQL: SELECT DISTINCT business_id FROM Business_Hours WHERE opening_time = '8AM' AND closing_time = '6PM'
Database: public_review_platform
Question: Provide business ids with opening hours 10AM on Saturday.
Evidence: opening hours 10AM on Saturday refer to Business_Hours where opening_time = '10AM' and day_id = 6;
SQL: SELECT DISTINCT business_id FROM Business_Hours WHERE day_id = 6 AND opening_time = '10AM'
Database: public_review_platform
Question: Indicate the business id and days which are opened from 8AM to 6PM.
Evidence: opened from 8AM to 6PM refers to Business_Hours where opening_time = '8AM' and closing_time = '6PM'; days refer to day_id;
SQL: SELECT DISTINCT day_id FROM Business_Hours WHERE opening_time = '8AM' AND closing_time = '6PM'
Database: public_review_platform
Question: How many businesses id are rated more than 4?
Evidence: rated more than 4 refers to stars > 4;
SQL: SELECT COUNT(business_id) FROM Business WHERE stars > 4
Database: public_review_platform
Question: What are the categories of businesses that have opening time on Sunday?
Evidence: categories of businesses refer to category_name; Sunday refers to day_of_week where day_id = 1;
SQL: SELECT DISTINCT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T2.business_id = T3.business_id INNER JOIN Days AS T4 ON T3.day_id = T4.day_id WHERE T4.day_of_week = 'Sunday' AND T3.opening_time <> ''
Database: public_review_platform
Question: Please indicate the opening day of businesses whose category is pets.
Evidence: category is pets refers to category_name = 'Pets'; opening day refers to day_id from Business_Hours and opening_time;
SQL: SELECT DISTINCT T4.day_of_week FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T1.business_id = T3.business_id INNER JOIN Days AS T4 ON T3.day_id = T4.day_id WHERE T2.category_name = 'Pets'
Database: public_review_platform
Question: Please indicate the closing hours and business days of the businesses with the category named Doctors.
Evidence: closing hours refer to closing_time; business days refer to day_id from Business_Hours;
SQL: SELECT DISTINCT T3.opening_time, T3.day_id FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T1.business_id = T3.business_id INNER JOIN Days AS T4 ON T3.day_id = T4.day_id WHERE T2.category_name = 'Doctors'
Database: public_review_platform
Question: Among the working days from Monday to Saturday, which businesses with the category names work the most days?
Evidence: days from Monday to Saturday refer to day_id between 2 and 7; work the most days can be computed as MAX(COUNT(category_name where day_id between 2 and 7));
SQL: SELECT T2.category_name FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T1.business_id = T3.business_id INNER JOIN Days AS T4 ON T3.day_id = T4.day_id GROUP BY T2.category_name ORDER BY COUNT(T3.day_id) DESC LIMIT 1
Database: public_review_platform
Question: Please indicate the business id have the closing time with the category of Arts & Entertainment on Sunday.
Evidence: Sunday refers to day_of_week = 'Sunday' where day_id = 1; category of Arts & Entertainment refers to category_name = 'Arts & Entertainment';
SQL: SELECT T1.business_id, T3.closing_time FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T1.business_id = T3.business_id INNER JOIN Days AS T4 ON T3.day_id = T4.day_id WHERE T2.category_name = 'Arts & Entertainment' AND T4.day_of_week = 'Sunday'
Database: public_review_platform
Question: In businesses with a category of "DJs", how many businesses are rated less than 5?
Evidence: category of "DJs" refers to category_name = 'DJs'; rated less than 5 refers to stars < 5; businesses refer to business_id;
SQL: SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'DJs' AND T1.stars < 5
Database: public_review_platform
Question: List active business ids with opening times of 7AM and closing times of 8PM.
Evidence: opening times of 7AM and closing times of 8PM refer to Business_Hours where opening_time = '7AM' and closing_time = '8PM'; active business refers to business_id where active = 'true';
SQL: SELECT DISTINCT T4.business_id FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T2.business_id = T3.business_id INNER JOIN Business AS T4 ON T3.business_id = T4.business_id WHERE T4.active = 'true' AND T3.opening_time = '7AM' AND T3.closing_time = '8PM'
Database: public_review_platform
Question: How many businesses with the category named Stadiums & Arenas are rated highest?
Evidence: rated highest refers to MAX(stars); category_name = 'Stadiums & Arenas';
SQL: SELECT COUNT(T1.business_id) FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id WHERE T2.category_name = 'Stadiums & Arenas' AND T3.stars = ( SELECT MAX(stars) FROM Business )
Database: public_review_platform
Question: How many category id have low review count and rating more than 2?
Evidence: rating more than 2 refers to stars > 2;
SQL: SELECT COUNT(DISTINCT T1.category_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T3.review_count = 'Low' AND T3.stars > 2
Database: public_review_platform
Question: Which businesses with the category name Accessories have opening hours before 7AM?
Evidence: opening hours before 7AM refer to opening_time < '7AM'; businesses refer to business_id;
SQL: SELECT T1.business_id FROM Business_Hours AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Accessories' AND SUBSTR(T1.opening_time, -4, 2) * 1 < 7 AND T1.opening_time LIKE '%AM'
Database: public_review_platform
Question: Among the active businesses in Arizona, how many businesses work after 12PM?
Evidence: active businesses in Arizona refer to business_id where state = 'Arizona' and active = 'true'; work after 12PM refer to opening_time > '12PM';
SQL: SELECT COUNT(DISTINCT T2.business_id) FROM Business_Hours AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T2.active = 'true' AND T2.state = 'AZ' AND T1.opening_time > '12PM'
Database: public_review_platform
Question: Please provide the name of businesses with user id "16328".
Evidence: name of business refers to category_name;
SQL: SELECT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Tips AS T3 ON T2.business_id = T3.business_id WHERE T3.user_id = 16328