Question: Use the HousePrices.db. Write a script that: Will bin the prices into 3 bins Bin 1 = $100,000 to $199,000 Bin 2 = $200,000 to

 Use the HousePrices.db. Write a script that: Will bin the prices

  1. Use the HousePrices.db. Write a script that:
    1. Will bin the prices into 3 bins

Bin 1 = $100,000 to $199,000

Bin 2 = $200,000 to $299,000

Bin 3 = $300,000 and up

  1. Will create a 1-hot-encoding of the binned prices.

The final table should look like this

HouseID

Price

Bin

Bin1

Bin2

Bin3

1

250,000

2

0

1

0

2

310,000

3

0

0

1

Copy and paste your SQL code in this file or submit an extra file.

1 2 3 4 5 6 7 123 houselD T: 123 price Ti 1 250,000 2 310,000 3 160,000 4 310,000 5 360,000 6 500,000 7 210,000 8 155,000 9 190,000 10 230,000 8 9 10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!