Skip to content

Instantly share code, notes, and snippets.

z,d=a=%W|ズン ドコ|;s="";until s[z*4+d] do puts c=a.sample;s+=c end;puts "キ・ヨ・シ!"
@shunsugai
shunsugai / create_table_for_salmon_run.sql
Created February 16, 2021 11:46
サーモンランの結果をAmazon Athenaで分析するためのCREATE TABLE文
CREATE EXTERNAL TABLE IF NOT EXISTS {your_table_name_here} (
job_score int,
job_result struct<failure_wave: int,
failure_reason: string,
is_clear: boolean
>,
wave_details array<struct<golden_ikura_pop_num: int,
ikura_num: int,
golden_ikura_num: int,
quota_num: int,
@shunsugai
shunsugai / event_type_wave_type_stats.sql
Created February 16, 2021 12:06
イベント・潮位別成功率
WITH all_waves AS (
SELECT
CONCAT(
CAST(job_id AS VARCHAR),
'-',
CAST(details.quota_num AS VARCHAR)
) AS wave_id,
job_id,
details.quota_num,
details.event_type.name AS event,