Fix the bug on admin/statistics/sales_orders.
@stats_latest_category does not include service sales_orders.
Adjust the statistics by category in summary section.
Fix typo in a comment.
Fix request tests.
Add sign_in_before_request in spec_helper.rb
Sign in before all admin's requests.
Create a lib to hold all statistics related methods in SQL.
All methods are dependent on Postgres.
Add a spec_helper to get sql for testing.
Create a lib to hold some active_record helper methods.
Add a helper to format date via strftime.
Mixin statistics lib to product model.
Refactor the admin/statistics/products.