SELECT * FROM yelp_db.category;
businesss - review count
category- restaurant;
use yelp_db;
select * from category c , business b where (c.category = 'Restaurants' AND b.id = c.business_id and b.review_count >1000);
select b.name,b.city,b.state,b.review_count,c.category from category c , business b where (c.category = 'Restaurants' AND b.id = c.business_id ) group by b.state order by b.review_count;
select b.name,b.city,b.state,b.review_count,c.category from category c , business b where (c.category = 'Restaurants' AND b.id = c.business_id ) group by b.city order by b.review_count;
select b.id from review r, business b, category c where r.date > '2017-05-01 00:00:00' and b.id =r.id;
businesss - review count
category- restaurant;
use yelp_db;
select * from category c , business b where (c.category = 'Restaurants' AND b.id = c.business_id and b.review_count >1000);
select b.name,b.city,b.state,b.review_count,c.category from category c , business b where (c.category = 'Restaurants' AND b.id = c.business_id ) group by b.state order by b.review_count;
select b.name,b.city,b.state,b.review_count,c.category from category c , business b where (c.category = 'Restaurants' AND b.id = c.business_id ) group by b.city order by b.review_count;
select b.id from review r, business b, category c where r.date > '2017-05-01 00:00:00' and b.id =r.id;
Comments
Post a Comment