j-sm-n / black_thursday

Black Thursday is a system that is able to load, parse, search, and execute business intelligence queries against the data from a typical e-commerece business in Ruby.
0 stars 0 forks source link

Business Intelligence - Find the x customers that spent the most $ #65

Open jesse-spevack opened 8 years ago

jesse-spevack commented 8 years ago

Find the x customers that spent the most $:

sa = SalesAnalyst.new

sa.top_buyers(x) #=> [customer, customer, customer, customer, customer]

If no number is given for top_buyers, it takes the top 20 customers by default

sa = SalesAnalyst.new

sa.top_buyers #=> [customer * 20]

https://github.com/turingschool/curriculum/blob/master/source/projects/black_thursday/iteration_5.markdown