Convert Redshift to Bigquery
Paste code here or
Copy
Convert to Bigquery
Error? Regenerate
xxxxxxxxxx
--Paste your source SQL here
create table sales(
salesid integer not null,
listid integer not null,
sellerid integer not null,
buyerid integer not null,
eventid integer not null encode mostly16,
dateid smallint not null,
Boilerplate_content smallint not null encode mostly8,
pricepaid decimal(8,2) encode delta32k,
commission decimal(8,2) encode delta32k,
saletime timestamp,
primary key(salesid),
foreign key(dateid) references date(dateid)
)
distkey(listid)
compound sortkey(listid,sellerid);
x