require "#{__dir__}/setup"
_ { QuickScript::General::PreProfessionalLeaguePlayerScript.new(user_name: "三田敏弘").call } # => "76.73 ms"
s { QuickScript::General::PreProfessionalLeaguePlayerScript.new(user_name: "三田敏弘").call }
s { QuickScript::General::PreProfessionalLeaguePlayerScript.new(user_name: "三田敏弘").bottom_content }

# >>   Ppl::User Load (0.3ms)  SELECT `ppl_users`.* FROM `ppl_users` WHERE `ppl_users`.`name` = '三田敏弘' LIMIT 1 /*application='ShogiWeb'*/
# >>   ↳ app/models/ppl/user.rb:44:in 'Ppl::User.[]'
# >>   SQL (0.8ms)  SELECT `ppl_memberships`.`id` AS t0_r0, `ppl_memberships`.`season_id` AS t0_r1, `ppl_memberships`.`user_id` AS t0_r2, `ppl_memberships`.`result_id` AS t0_r3, `ppl_memberships`.`age` AS t0_r4, `ppl_memberships`.`win` AS t0_r5, `ppl_memberships`.`lose` AS t0_r6, `ppl_memberships`.`ox` AS t0_r7, `ppl_memberships`.`created_at` AS t0_r8, `ppl_memberships`.`updated_at` AS t0_r9, `ppl_seasons`.`id` AS t1_r0, `ppl_seasons`.`key` AS t1_r1, `ppl_seasons`.`position` AS t1_r2, `ppl_seasons`.`created_at` AS t1_r3, `ppl_seasons`.`updated_at` AS t1_r4, `ppl_results`.`id` AS t2_r0, `ppl_results`.`key` AS t2_r1, `ppl_results`.`position` AS t2_r2, `ppl_results`.`created_at` AS t2_r3, `ppl_results`.`updated_at` AS t2_r4 FROM `ppl_memberships` LEFT OUTER JOIN `ppl_seasons` ON `ppl_seasons`.`id` = `ppl_memberships`.`season_id` LEFT OUTER JOIN `ppl_results` ON `ppl_results`.`id` = `ppl_memberships`.`result_id` WHERE `ppl_memberships`.`user_id` = 358 ORDER BY `ppl_seasons`.`position` DESC /*application='ShogiWeb'*/
# >>   ↳ app/models/quick_script/general/pre_professional_league_player_script.rb:53:in 'Enumerable#collect'
# >>   Ppl::User Load (0.4ms)  SELECT `ppl_users`.* FROM `ppl_users` WHERE `ppl_users`.`name` = '三田敏弘' LIMIT 1 /*application='ShogiWeb'*/
# >>   ↳ app/models/ppl/user.rb:44:in 'Ppl::User.[]'
# >>   Ppl::Membership Pluck (0.5ms)  SELECT DISTINCT `ppl_memberships`.`season_id` FROM `ppl_memberships` WHERE `ppl_memberships`.`user_id` = 358 /*application='ShogiWeb'*/
# >>   ↳ app/models/quick_script/general/pre_professional_league_player_script.rb:100:in 'QuickScript::General::PreProfessionalLeaguePlayerScript#bottom_content'
# >>   SQL (11.7ms)  SELECT DISTINCT `ppl_users`.`id` AS t0_r0, `ppl_users`.`rank_id` AS t0_r1, `ppl_users`.`mentor_id` AS t0_r2, `ppl_users`.`name` AS t0_r3, `ppl_users`.`age_min` AS t0_r4, `ppl_users`.`age_max` AS t0_r5, `ppl_users`.`runner_up_count` AS t0_r6, `ppl_users`.`win_max` AS t0_r7, `ppl_users`.`win_ratio` AS t0_r8, `ppl_users`.`promotion_membership_id` AS t0_r9, `ppl_users`.`promotion_win` AS t0_r10, `ppl_users`.`promotion_season_position` AS t0_r11, `ppl_users`.`memberships_first_id` AS t0_r12, `ppl_users`.`memberships_last_id` AS t0_r13, `ppl_users`.`deactivated_membership_id` AS t0_r14, `ppl_users`.`memberships_count` AS t0_r15, `ppl_users`.`created_at` AS t0_r16, `ppl_users`.`updated_at` AS t0_r17, `ppl_ranks`.`id` AS t1_r0, `ppl_ranks`.`key` AS t1_r1, `ppl_ranks`.`position` AS t1_r2, `ppl_ranks`.`created_at` AS t1_r3, `ppl_ranks`.`updated_at` AS t1_r4 FROM `ppl_users` INNER JOIN `ppl_memberships` ON `ppl_memberships`.`user_id` = `ppl_users`.`id` LEFT OUTER JOIN `ppl_ranks` ON `ppl_ranks`.`id` = `ppl_users`.`rank_id` WHERE `ppl_memberships`.`season_id` IN (103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121) ORDER BY `ppl_ranks`.`position` ASC, `ppl_users`.`promotion_season_position` DESC, `ppl_users`.`promotion_win` DESC, `ppl_users`.`runner_up_count` DESC, `ppl_users`.`age_min` ASC, `ppl_users`.`memberships_count` ASC /*application='ShogiWeb'*/
# >>   ↳ app/models/quick_script/general/pre_professional_league_player_script.rb:106:in 'Enumerable#collect'
