Gets sales data from database