Question: I can not get this SQL core to function. CREATE TABLE bitcoin _ data ( Date DATE, Open NUMERIC ( 2 0 , 5 )

I can not get this SQL core to function.
CREATE TABLE bitcoin_data (
Date DATE,
Open NUMERIC(20,5),
High NUMERIC(20,5),
Low NUMERIC(20,5),
Close NUMERIC(20,5),
Volume NUMERIC(20,5),
Market_Cap NUMERIC(20,5)
);
--------------------------------------------------------------------------------
/* Copy Statement */
--------------------------------------------------------------------------------
COPY bitcoin_data
FROM 'D:\DTSC660\bitcoin_data.csv'
WITH (FORMAT CSV, HEADER);
--------------------------------------------------------------------------------
/* Select Statement */
--------------------------------------------------------------------------------
SELECT * FROM bitcoin_data LIMIT 10;
--------------------------------------------------------------------------------
/*Part 2*/
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
/* Query 1*/
--------------------------------------------------------------------------------
SELECT *
FROM bitcoin_data;
--------------------------------------------------------------------------------
/* Query 2*/
--------------------------------------------------------------------------------
SELECT trans_date, CAST(code_size AS DECIMAL)/ transactions AS difficulty
FROM bitcoin_data;

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!