Question: Write a query to find events in the highest 99.9 percentile for all-time gross sales. Hint: The structured query language (SQL) ntile function will

Write a query to find events in the highest 99.9 percentile for all-time gross sales. Hint: The structured create table sales( salesid integer not null, listid integer not null distkey, sellerid integer not null,

Write a query to find events in the highest 99.9 percentile for all-time gross sales. Hint: The structured query language (SQL) ntile function will return a dataset into a group of buckets as specified by the function's argument. For example, ntile (1000) orders will return the highest 99.9 percentile for a dataset of orders. create table sales( salesid integer not null, listid integer not null distkey, sellerid integer not null, buyerid integer not null, eventid integer not null, dateid smallint not null sortkey, qtysold smallint not null, pricepaid decimal (8,2), commission decimal(8,2), saletime timestamp);

Step by Step Solution

3.40 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure here is a SQL query to find events in the highest 999 percentile for alltime gross sales SELECT ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!