### Database Schema:
CREATE TABLE Business (
	business_id	INTEGER	NULL	PRIMARY KEY,
	active	TEXT	NULL,
	city	TEXT	NULL,
	state	TEXT	NULL,
	stars	REAL	NULL,
	review_count	TEXT	NULL
);

CREATE TABLE Business_Attributes (
	attribute_id	INTEGER	NULL	PRIMARY KEY,
	business_id	INTEGER	NULL	PRIMARY KEY,
	attribute_value	TEXT	NULL,
	foreign key (business_id) references Business (business_id),
	foreign key (attribute_id) references Attributes (attribute_id)
);

CREATE TABLE Users_Compliments (
	compliment_id	INTEGER	NULL	PRIMARY KEY,
	user_id	INTEGER	NULL	PRIMARY KEY,
	number_of_compliments	TEXT	NULL,
	foreign key (user_id) references Users (user_id),
	foreign key (compliment_id) references Compliments (compliment_id)
);

CREATE TABLE Categories (
	category_id	INTEGER	NULL	PRIMARY KEY,
	category_name	TEXT	NULL
);

CREATE TABLE Checkins (
	business_id	INTEGER	NULL	PRIMARY KEY,
	day_id	INTEGER	NULL	PRIMARY KEY,
	label_time_0	TEXT	NULL,
	label_time_1	TEXT	NULL,
	label_time_2	TEXT	NULL,
	label_time_3	TEXT	NULL,
	label_time_4	TEXT	NULL,
	label_time_5	TEXT	NULL,
	label_time_6	TEXT	NULL,
	label_time_7	TEXT	NULL,
	label_time_8	TEXT	NULL,
	label_time_9	TEXT	NULL,
	label_time_10	TEXT	NULL,
	label_time_11	TEXT	NULL,
	label_time_12	TEXT	NULL,
	label_time_13	TEXT	NULL,
	label_time_14	TEXT	NULL,
	label_time_15	TEXT	NULL,
	label_time_16	TEXT	NULL,
	label_time_17	TEXT	NULL,
	label_time_18	TEXT	NULL,
	label_time_19	TEXT	NULL,
	label_time_20	TEXT	NULL,
	label_time_21	TEXT	NULL,
	label_time_22	TEXT	NULL,
	label_time_23	TEXT	NULL,
	foreign key (day_id) references Days (day_id),
	foreign key (business_id) references Business (business_id)
);

CREATE TABLE Business_Hours (
	business_id	INTEGER	NULL	PRIMARY KEY,
	day_id	INTEGER	NULL	PRIMARY KEY,
	opening_time	TEXT	NULL,
	closing_time	TEXT	NULL,
	foreign key (day_id) references Days (day_id),
	foreign key (business_id) references Business (business_id)
);

CREATE TABLE Days (
	day_id	INTEGER	NULL	PRIMARY KEY,
	day_of_week	TEXT	NULL
);

CREATE TABLE Users (
	user_id	INTEGER	NULL	PRIMARY KEY,
	user_yelping_since_year	INTEGER	NULL,
	user_average_stars	TEXT	NULL,
	user_votes_funny	TEXT	NULL,
	user_votes_useful	TEXT	NULL,
	user_votes_cool	TEXT	NULL,
	user_review_count	TEXT	NULL,
	user_fans	TEXT	NULL
);

CREATE TABLE Business_Categories (
	business_id	INTEGER	NULL	PRIMARY KEY,
	category_id	INTEGER	NULL	PRIMARY KEY,
	foreign key (category_id) references Categories (category_id),
	foreign key (business_id) references Business (business_id)
);

CREATE TABLE Attributes (
	attribute_id	INTEGER	NULL	PRIMARY KEY,
	attribute_name	TEXT	NULL
);

CREATE TABLE Tips (
	business_id	INTEGER	NULL	PRIMARY KEY,
	user_id	INTEGER	NULL	PRIMARY KEY,
	likes	INTEGER	NULL,
	tip_length	TEXT	NULL,
	foreign key (business_id) references Business (business_id),
	foreign key (user_id) references Users (user_id)
);

CREATE TABLE Reviews (
	business_id	INTEGER	NULL	PRIMARY KEY,
	user_id	INTEGER	NULL	PRIMARY KEY,
	review_stars	INTEGER	NULL,
	review_votes_funny	TEXT	NULL,
	review_votes_useful	TEXT	NULL,
	review_votes_cool	TEXT	NULL,
	review_length	TEXT	NULL,
	foreign key (user_id) references Users (user_id),
	foreign key (business_id) references Business (business_id)
);

CREATE TABLE Elite (
	user_id	INTEGER	NULL	PRIMARY KEY,
	year_id	INTEGER	NULL	PRIMARY KEY,
	foreign key (year_id) references Years (year_id),
	foreign key (user_id) references Users (user_id)
);

CREATE TABLE Compliments (
	compliment_id	INTEGER	NULL	PRIMARY KEY,
	compliment_type	TEXT	NULL
);

CREATE TABLE Years (
	year_id	INTEGER	NULL	PRIMARY KEY,
	actual_year	INTEGER	NULL
);

### User's Query:
List out which business category that are most likely to have average good review in Arizona?

### Extra Knowledge:
average good review refers to review_count > = 3; Arizona refers to state = 'AZ'; business category refers to category_name
SELECT DISTINCT T4.category_name FROM Reviews 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.state LIKE 'AZ' AND T1.review_stars >= 3