SALES table - Amazon Redshift

SALES table

Column name Data type Description
SALESID INTEGER Primary key, a unique ID value for each row. Each row represents a sale of one or more tickets for a specific event, as offered in a specific listing.
LISTID INTEGER Foreign-key reference to the LISTING table.
SELLERID INTEGER Foreign-key reference to the USERS table (the user who sold the tickets).
BUYERID INTEGER Foreign-key reference to the USERS table (the user who bought the tickets).
EVENTID INTEGER Foreign-key reference to the EVENT table.
DATEID SMALLINT Foreign-key reference to the DATE table.
QTYSOLD SMALLINT The number of tickets that were sold, from 1 to 8. (A maximum of 8 tickets can be sold in a single transaction.)
PRICEPAID DECIMAL(8,2) The total price paid for the tickets, such as 75.00 or 488.00. The individual price of a ticket is PRICEPAID/QTYSOLD.
COMMISSION DECIMAL(8,2) The 15% commission that the business collects from the sale, such as 11.25 or 73.20. The seller receives 85% of the PRICEPAID value.
SALETIME TIMESTAMP The full date and time when the sale was completed, such as 2008-05-24 06:21:47.