Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are an aspiring entrepreneur and are looking for the best business in several states to study their case study. List the top 5 states

You are an aspiring entrepreneur and are looking for the best business in several states to study their case study. List the top 5 states where the majority of businesses have received five stars. You have to find out the State name and the number of 5- star businesses in the state, and the results are sorted according to the number of 5- star firms. If there is a tie for the number of businesses in the different states, return all separate states. If the results from two states are identical, order the states alphabetically.
Table Name:- hulk_business
Tables Schema as Below:
hulk_business
columnName dataType
business_id VARCHAR(50)
name VARCHAR(255)
neighborhood VARCHAR(255)
address VARCHAR(255)
city VARCHAR(255)
state VARCHAR(255)
postal_code VARCHAR(10)
latitude DECIMAL(10,6)
longitude DECIMAL(10,6)
stars DECIMAL(3,1)
review_count INT
is_open INT
categories VARCHAR(255)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions