--32575
\COPY coleveloutput TO 'coleveloutput.txt' WITH DELIMITER AS E'\t' HEADER NULL AS '' CSV
==Cleaning round table==
Use coname, rounddate as the key for this table. Exclude all keys that occur more than once.
CREATE TABLE roundexclude AS
SELECT * FROM (
SELECT coname, rounddate FROM round) t
GROUP BY coname, rounddate
HAVING COUNT(*) > 1;
--154
CREATE TABLE roundcore AS
SELECT * FROM round
WHERE NOT EXISTS (SELECT * FROM roundexclude AS re WHERE re.coname = round.coname AND re.rounddate = round.rounddate);
--143000
==Creating Stage Flags Table==