CREATE TABLE business (bid NUMBER, business_id VARCHAR2, name VARCHAR2, full_address VARCHAR2, city VARCHAR2, latitude VARCHAR2, longitude VARCHAR2, review_count NUMBER, is_open NUMBER, rating FLOAT, state VARCHAR2)
CREATE TABLE neighborhood (id NUMBER, business_id VARCHAR2, neighborhood_name VARCHAR2)
CREATE TABLE category (id NUMBER, business_id VARCHAR2, category_name VARCHAR2)
CREATE TABLE review (rid NUMBER, business_id VARCHAR2, user_id VARCHAR2, rating FLOAT, text TEXT, year NUMBER, month VARCHAR2)
CREATE TABLE tip (tip_id NUMBER, business_id VARCHAR2, text TEXT, user_id VARCHAR2, likes NUMBER, year NUMBER, month VARCHAR2)
CREATE TABLE checkin (cid NUMBER, business_id VARCHAR2, count NUMBER, day VARCHAR2)
CREATE TABLE user (uid NUMBER, user_id VARCHAR2, name VARCHAR2)

How many neighborhoods have a business with rating 5 in Madison ?
SELECT COUNT(DISTINCT (neighborhood.neighborhood_name)) FROM business, neighborhood WHERE business.city = 'Madison' AND business.rating = 5 AND neighborhood.business_id = business.business_id
SELECT COUNT(DISTINCT "neighborhood"."neighborhood_name") FROM "business" JOIN "neighborhood" ON "business"."business_id" = "neighborhood"."business_id" WHERE "business"."city" = 'Madison' AND "business"."rating" = 5