You are on page 1of 2

23:38 21/04/2024 Skill Assessment

Back to Results

Data Management in SQL (PostgreSQL)

Question 6

Advanced

Intermediate

Novice

1 2 3 4 5 6 7 8 9 10 11 12 13

There was an error in your code BETA

In your code, you did not specify the data type conversion for the Station_ID column. This resulted in the output showing [object
Object] instead of the actual values. By adding :: INT after Station_ID, you are explicitly converting the data type to an
integer, which resolves the issue and displays the correct output.

Was the AI Assistant helpful?

Yes No

From the bike_stations table, convert the Station_ID column to INTEGER data type.

-- bike_stations
| Station_ID | Latitude | Longitude |
|---------------|--------------|----------------|
| 3045.0 | 34.028511 | -118.25667 |
| 3046.0 | 34.05302 | -118.247948 |
| 3055.0 | 34.044159 | -118.251579 |

Complete the code to return the output

SELECT station_id,
SELECT Station_ID :: INT,
Latitude,
Longitude
FROM bike_stations;

Expected Output Your Output

station_id latitude longitude station_id latitude longitude

3045 34.028511 -118.25667 3045.0 34.028511 -118.25667

3046 34.05302 -118.247948 3046.0 34.05302 -118.247948

3055 34.044159 -118.251579 3055.0 34.044159 -118.251579

Incorrect answer

Difficulty MEDIUM

https://assessment-v2.datacamp.com/15e09043-62d9-4b3e-a10c-638c40a5ea4c/review?returnUrl=https%253A%252F%252Fapp.datacamp.com%252Fcertificat… 1/2
23:38 21/04/2024 Skill Assessment

Skill Cleaning and Preparation

Report Issue

https://assessment-v2.datacamp.com/15e09043-62d9-4b3e-a10c-638c40a5ea4c/review?returnUrl=https%253A%252F%252Fapp.datacamp.com%252Fcertificat… 2/2

You might also like