Top 100 Ticket Buyers

I have been asked to find the top 100 ticket buyers in our system.  (Based totally on the number of ticket purchased.)  But I'm not sure what is the best way to go about finding this information.  I do have T-Stats but I'm stumped on the recipe.  Any ideas?

Thanks,

Elizabeth Carlock

 

Parents
  • I don't have t-stats, but a general approximation can be found by running sql:

     

    select top 100 o.customer_no, COUNT(o.customer_no) as tickettotal 

    from dbo.T_SUB_LINEITEM s

    inner join T_ORDER o on s.order_no = o.order_no

    group by o.customer_no

    order by tickettotal desc

     

    This just counts the subline items, which also include refunds comps etc..., but as its just a top 100, the answer will be approximately correct

Reply
  • I don't have t-stats, but a general approximation can be found by running sql:

     

    select top 100 o.customer_no, COUNT(o.customer_no) as tickettotal 

    from dbo.T_SUB_LINEITEM s

    inner join T_ORDER o on s.order_no = o.order_no

    group by o.customer_no

    order by tickettotal desc

     

    This just counts the subline items, which also include refunds comps etc..., but as its just a top 100, the answer will be approximately correct

Children
No Data