-- This script will import the data in the hw1-data.txt
-- data file into PostgreSQL --- specifically, into the public.hw1_data table 
-- in the current database.  To run, feed it to the psql utility as:
--   psql -f postgres-import-hw1-data.sql [your Postgres database name]
--
-- Note that this script, as written, assumes that the hw1-data.txt file
-- is in the same directory as the one you ran psql from.  To change this,
-- change the filename in the \copy command to point to the correct
-- directory.  Use slashes / instead of backslashes \ as directory
-- separators.
--

CREATE TABLE hw1_data (
	name varchar(50),
	discount varchar(50),
	month varchar(50),
	price varchar(50)
);
\copy hw1_data from 'hw1-data.txt'
-- get rid of header row
DELETE FROM hw1_data WHERE name='name';
