## 일반 장비 상자(골드)
select amount, count(1)
  from eod_log.table_gold
 group by consume_route, amount having consume_route = 4;
 
## 일반 장비 상자(우정포인트)
select amount, count(1)
  from eod_log.table_friendship_point
 group by consume_route, amount having consume_route = 4;
 
## 고급 장비 상자
select amount, count(1)
  from eod_log.table_gem
 group by consume_route, amount having consume_route = 4 and amount = 300;
 
## 고급 장비 상자 10 + 1
select amount, count(1)
  from eod_log.table_gem
 group by consume_route, amount having consume_route = 4 and amount = 3000;

## 일반 룬스톤 상자(골드)
select amount, count(1)
  from eod_log.table_gold
 group by consume_route, amount having consume_route = 5;
 
## 고급 룬스톤 상자
select amount, count(1)
  from eod_log.table_gem
 group by consume_route, amount having consume_route = 5 and amount = 270;
 
## 고급 룬스톤 상자 10 + 1
select amount, count(1)
  from eod_log.table_gem
 group by consume_route, amount having consume_route = 5 and amount = 2700;
 
## 골드 구입
select amount, count(1)
  from eod_log.table_gem
 group by consume_route, amount having consume_route = 3;
 
## 열쇠 구입
select amount, count(1)
  from eod_log.table_gem
 group by consume_route, amount having consume_route = 2;
 
## 열쇠 구입 (우정포인트)
select amount, count(1)
  from eod_log.table_friendship_point
 group by consume_route, amount having consume_route = 2;
 
## 요일던전 입장횟수 초기화
select amount, count(1)
  from eod_log.table_gem
 group by consume_route, amount having consume_route = 30;

## 균열던전 입장횟수 초기화
select amount, count(1)
  from eod_log.table_gem
 group by consume_route, amount having consume_route = 31;
 
## 결투장 입장횟수 초기화
select amount, count(1)
  from eod_log.table_gem
 group by consume_route, amount having consume_route = 32;
 
## 정예던전 입장횟수 초기화
select amount, count(1)
  from eod_log.table_gem
 group by consume_route, amount having consume_route = 33;
 
## 가방 확장 (골드 사용)
select amount, count(1)
  from eod_log.table_gold
 group by consume_route, amount having consume_route = 28;
 
## 가방 확장 (다이아 사용)
select amount, count(1)
  from eod_log.table_gem
 group by consume_route, amount having consume_route = 28;
 
## 조력자 상점 구매 (골드)
select amount, count(1)
  from eod_log.table_gold
 group by consume_route, amount having consume_route = 7;

## 조력자 상점 구매 (다이아)
select amount, count(1)
  from eod_log.table_gem
 group by consume_route, amount having consume_route = 7;
 
## 아바타 구매
select general_type_code, count(1)
  from eod_log.table_avatar
 group by general_type_code 

## 스킬포인트 구매횟수
select sum(A.`count`)
  from (
			select floor(amount/300)*count(1) as `count`
			  from eod_log.table_gem
			 group by consume_route, amount having consume_route = 14
 		 ) A;

## 장비 옵션 변경(골드)
select amount, count(1)
  from eod_log.table_gold
 group by consume_route, amount having consume_route = 23;
 
## 장비 옵션 변경(다이아)
select amount, count(1)
  from eod_log.table_gem
 group by consume_route, amount having consume_route = 23;
 

## 일반 던전 도전횟수
select general_type_code, count(1)
  from eod_log.table_stage_normal
 group by general_type_code;
 
## 일반 던전 클리어 횟수
select general_type_code, count(1)
  from eod_log.table_stage_normal
 group by general_type_code, is_clear having is_clear = 1;
 
## 정예 던전 도전횟수
select general_type_code, count(1)
  from eod_log.table_stage_elite
 group by general_type_code;
 
## 정예 던전 클리어 횟수 + 평균 레벨
select general_type_code, count(1), floor(avg(character_level))
  from eod_log.table_stage_elite
 group by general_type_code, is_clear having is_clear = 1;
 
## 균열 던전 클리어 횟수 + 평균 레벨
select general_type_code, count(1), floor(avg(character_level))
  from eod_log.table_stage_rift
 group by general_type_code, is_clear having is_clear = 1;
 
## 초월 던전 도전횟수
select general_type_code, count(1)
  from eod_log.table_stage_transcendence
 group by general_type_code;
 
## 초월 던전 클리어 횟수 + 평균 레벨
select general_type_code, count(1), floor(avg(character_level))
  from eod_log.table_stage_transcendence
 group by general_type_code, is_clear having is_clear = 1;
 
## 요일 던전 도전 횟수
select general_type_code, count(1)
  from eod_log.table_stage_weekly
 group by general_type_code;
 
## 요일 던전 클리어 횟수 + 평균 레벨
select general_type_code, count(1), floor(avg(character_level))
  from eod_log.table_stage_weekly
 group by general_type_code, is_clear having is_clear = 1;

## 룬스톤 보유현황 (현재 시점에)
select worth_code, sum(amount)
  from eod_game.table_worth
 where worth_code between 160000101 and 160000407
 group by worth_code;
 
## 수호석 강화 현황 (현재 시점에)

create table eod_game.temp_enhance_level
(
guardian_stone_code int not null,
`level` int not null,
primary key (guardian_stone_code, `level`)
);

insert into eod_game.temp_enhance_level
(`guardian_stone_code`, `level`)
values
(150001401, 0),(150001401, 1),(150001401, 2),(150001401, 3),(150001401, 4),(150001401, 5),(150001401, 6),(150001401, 7),(150001401, 8),(150001401, 9),(150001401, 10),
(150001401, 11),(150001401, 12),(150001401, 13),(150001401, 14),(150001401, 15),(150001401, 16),(150001401, 17),(150001401, 18),(150001401, 19),(150001401, 20),
(150001401, 21),(150001401, 22),(150001401, 23),(150001401, 24),(150001401, 25),(150001401, 26),(150001401, 27),(150001401, 28),(150001401, 29),(150001401, 30),
(150001401, 31),(150001401, 32),(150001401, 33),(150001401, 34),(150001401, 35),(150001401, 36),(150001401, 37),(150001401, 38),(150001401, 39),(150001401, 40),
(150001401, 41),(150001401, 42),(150001401, 43),(150001401, 44),(150001401, 45),(150001401, 46),(150001401, 47),(150001401, 48),(150001401, 49),(150001401, 50),
(150001401, 51),(150001401, 52),(150001401, 53),(150001401, 54),(150001401, 55),(150001401, 56),(150001401, 57),(150001401, 58),(150001401, 59),(150001401, 60),
(150001401, 61),(150001401, 62),(150001401, 63),(150001401, 64),(150001401, 65),(150001401, 66),(150001401, 67),(150001401, 68),(150001401, 69),(150001401, 70),
(150001401, 71),(150001401, 72),(150001401, 73),(150001401, 74),(150001401, 75),(150001401, 76),(150001401, 77),(150001401, 78),(150001401, 79),(150001401, 80),
(150001401, 81),(150001401, 82),(150001401, 83),(150001401, 84),(150001401, 85),(150001401, 86),(150001401, 87),(150001401, 88),(150001401, 89),(150001401, 90),
(150001401, 91),(150001401, 92),(150001401, 93),(150001401, 94),(150001401, 95),(150001401, 96),(150001401, 97),(150001401, 98),(150001401, 99),(150001401, 100),
(150001401, 101),(150001401, 102),(150001401, 103),(150001401, 104),(150001401, 105),(150001401, 106),(150001401, 107),(150001401, 108),(150001401, 109),(150001401, 110),
(150001401, 111),(150001401, 112),(150001401, 113),(150001401, 114),(150001401, 115),(150001401, 116),(150001401, 117),(150001401, 118),(150001401, 119),(150001401, 120),
(150001401, 121),(150001401, 122),(150001401, 123),(150001401, 124),(150001401, 125),(150001401, 126),(150001401, 127),(150001401, 128),(150001401, 129),(150001401, 130),
(150001401, 131),(150001401, 132),(150001401, 133),(150001401, 134),(150001401, 135),(150001401, 136),(150001401, 137),(150001401, 138),(150001401, 139),(150001401, 140),
(150001401, 141),(150001401, 142),(150001401, 143),(150001401, 144),(150001401, 145),(150001401, 146),(150001401, 147),(150001401, 148),(150001401, 149),(150001401, 150),
(150001402, 0),(150001402, 1),(150001402, 2),(150001402, 3),(150001402, 4),(150001402, 5),(150001402, 6),(150001402, 7),(150001402, 8),(150001402, 9),(150001402, 10),
(150001402, 11),(150001402, 12),(150001402, 13),(150001402, 14),(150001402, 15),(150001402, 16),(150001402, 17),(150001402, 18),(150001402, 19),(150001402, 20),
(150001402, 21),(150001402, 22),(150001402, 23),(150001402, 24),(150001402, 25),(150001402, 26),(150001402, 27),(150001402, 28),(150001402, 29),(150001402, 30),
(150001402, 31),(150001402, 32),(150001402, 33),(150001402, 34),(150001402, 35),(150001402, 36),(150001402, 37),(150001402, 38),(150001402, 39),(150001402, 40),
(150001402, 41),(150001402, 42),(150001402, 43),(150001402, 44),(150001402, 45),(150001402, 46),(150001402, 47),(150001402, 48),(150001402, 49),(150001402, 50),
(150001402, 51),(150001402, 52),(150001402, 53),(150001402, 54),(150001402, 55),(150001402, 56),(150001402, 57),(150001402, 58),(150001402, 59),(150001402, 60),
(150001402, 61),(150001402, 62),(150001402, 63),(150001402, 64),(150001402, 65),(150001402, 66),(150001402, 67),(150001402, 68),(150001402, 69),(150001402, 70),
(150001402, 71),(150001402, 72),(150001402, 73),(150001402, 74),(150001402, 75),(150001402, 76),(150001402, 77),(150001402, 78),(150001402, 79),(150001402, 80),
(150001402, 81),(150001402, 82),(150001402, 83),(150001402, 84),(150001402, 85),(150001402, 86),(150001402, 87),(150001402, 88),(150001402, 89),(150001402, 90),
(150001402, 91),(150001402, 92),(150001402, 93),(150001402, 94),(150001402, 95),(150001402, 96),(150001402, 97),(150001402, 98),(150001402, 99),(150001402, 100),
(150001402, 101),(150001402, 102),(150001402, 103),(150001402, 104),(150001402, 105),(150001402, 106),(150001402, 107),(150001402, 108),(150001402, 109),(150001402, 110),
(150001402, 111),(150001402, 112),(150001402, 113),(150001402, 114),(150001402, 115),(150001402, 116),(150001402, 117),(150001402, 118),(150001402, 119),(150001402, 120),
(150001402, 121),(150001402, 122),(150001402, 123),(150001402, 124),(150001402, 125),(150001402, 126),(150001402, 127),(150001402, 128),(150001402, 129),(150001402, 130),
(150001402, 131),(150001402, 132),(150001402, 133),(150001402, 134),(150001402, 135),(150001402, 136),(150001402, 137),(150001402, 138),(150001402, 139),(150001402, 140),
(150001402, 141),(150001402, 142),(150001402, 143),(150001402, 144),(150001402, 145),(150001402, 146),(150001402, 147),(150001402, 148),(150001402, 149),(150001402, 150),
(150001403, 0),(150001403, 1),(150001403, 2),(150001403, 3),(150001403, 4),(150001403, 5),(150001403, 6),(150001403, 7),(150001403, 8),(150001403, 9),(150001403, 10),
(150001403, 11),(150001403, 12),(150001403, 13),(150001403, 14),(150001403, 15),(150001403, 16),(150001403, 17),(150001403, 18),(150001403, 19),(150001403, 20),
(150001403, 21),(150001403, 22),(150001403, 23),(150001403, 24),(150001403, 25),(150001403, 26),(150001403, 27),(150001403, 28),(150001403, 29),(150001403, 30),
(150001403, 31),(150001403, 32),(150001403, 33),(150001403, 34),(150001403, 35),(150001403, 36),(150001403, 37),(150001403, 38),(150001403, 39),(150001403, 40),
(150001403, 41),(150001403, 42),(150001403, 43),(150001403, 44),(150001403, 45),(150001403, 46),(150001403, 47),(150001403, 48),(150001403, 49),(150001403, 50),
(150001403, 51),(150001403, 52),(150001403, 53),(150001403, 54),(150001403, 55),(150001403, 56),(150001403, 57),(150001403, 58),(150001403, 59),(150001403, 60),
(150001403, 61),(150001403, 62),(150001403, 63),(150001403, 64),(150001403, 65),(150001403, 66),(150001403, 67),(150001403, 68),(150001403, 69),(150001403, 70),
(150001403, 71),(150001403, 72),(150001403, 73),(150001403, 74),(150001403, 75),(150001403, 76),(150001403, 77),(150001403, 78),(150001403, 79),(150001403, 80),
(150001403, 81),(150001403, 82),(150001403, 83),(150001403, 84),(150001403, 85),(150001403, 86),(150001403, 87),(150001403, 88),(150001403, 89),(150001403, 90),
(150001403, 91),(150001403, 92),(150001403, 93),(150001403, 94),(150001403, 95),(150001403, 96),(150001403, 97),(150001403, 98),(150001403, 99),(150001403, 100),
(150001403, 101),(150001403, 102),(150001403, 103),(150001403, 104),(150001403, 105),(150001403, 106),(150001403, 107),(150001403, 108),(150001403, 109),(150001403, 110),
(150001403, 111),(150001403, 112),(150001403, 113),(150001403, 114),(150001403, 115),(150001403, 116),(150001403, 117),(150001403, 118),(150001403, 119),(150001403, 120),
(150001403, 121),(150001403, 122),(150001403, 123),(150001403, 124),(150001403, 125),(150001403, 126),(150001403, 127),(150001403, 128),(150001403, 129),(150001403, 130),
(150001403, 131),(150001403, 132),(150001403, 133),(150001403, 134),(150001403, 135),(150001403, 136),(150001403, 137),(150001403, 138),(150001403, 139),(150001403, 140),
(150001403, 141),(150001403, 142),(150001403, 143),(150001403, 144),(150001403, 145),(150001403, 146),(150001403, 147),(150001403, 148),(150001403, 149),(150001403, 150),
(150001404, 0),(150001404, 1),(150001404, 2),(150001404, 3),(150001404, 4),(150001404, 5),(150001404, 6),(150001404, 7),(150001404, 8),(150001404, 9),(150001404, 10),
(150001404, 11),(150001404, 12),(150001404, 13),(150001404, 14),(150001404, 15),(150001404, 16),(150001404, 17),(150001404, 18),(150001404, 19),(150001404, 20),
(150001404, 21),(150001404, 22),(150001404, 23),(150001404, 24),(150001404, 25),(150001404, 26),(150001404, 27),(150001404, 28),(150001404, 29),(150001404, 30),
(150001404, 31),(150001404, 32),(150001404, 33),(150001404, 34),(150001404, 35),(150001404, 36),(150001404, 37),(150001404, 38),(150001404, 39),(150001404, 40),
(150001404, 41),(150001404, 42),(150001404, 43),(150001404, 44),(150001404, 45),(150001404, 46),(150001404, 47),(150001404, 48),(150001404, 49),(150001404, 50),
(150001404, 51),(150001404, 52),(150001404, 53),(150001404, 54),(150001404, 55),(150001404, 56),(150001404, 57),(150001404, 58),(150001404, 59),(150001404, 60),
(150001404, 61),(150001404, 62),(150001404, 63),(150001404, 64),(150001404, 65),(150001404, 66),(150001404, 67),(150001404, 68),(150001404, 69),(150001404, 70),
(150001404, 71),(150001404, 72),(150001404, 73),(150001404, 74),(150001404, 75),(150001404, 76),(150001404, 77),(150001404, 78),(150001404, 79),(150001404, 80),
(150001404, 81),(150001404, 82),(150001404, 83),(150001404, 84),(150001404, 85),(150001404, 86),(150001404, 87),(150001404, 88),(150001404, 89),(150001404, 90),
(150001404, 91),(150001404, 92),(150001404, 93),(150001404, 94),(150001404, 95),(150001404, 96),(150001404, 97),(150001404, 98),(150001404, 99),(150001404, 100),
(150001404, 101),(150001404, 102),(150001404, 103),(150001404, 104),(150001404, 105),(150001404, 106),(150001404, 107),(150001404, 108),(150001404, 109),(150001404, 110),
(150001404, 111),(150001404, 112),(150001404, 113),(150001404, 114),(150001404, 115),(150001404, 116),(150001404, 117),(150001404, 118),(150001404, 119),(150001404, 120),
(150001404, 121),(150001404, 122),(150001404, 123),(150001404, 124),(150001404, 125),(150001404, 126),(150001404, 127),(150001404, 128),(150001404, 129),(150001404, 130),
(150001404, 131),(150001404, 132),(150001404, 133),(150001404, 134),(150001404, 135),(150001404, 136),(150001404, 137),(150001404, 138),(150001404, 139),(150001404, 140),
(150001404, 141),(150001404, 142),(150001404, 143),(150001404, 144),(150001404, 145),(150001404, 146),(150001404, 147),(150001404, 148),(150001404, 149),(150001404, 150),
(150001405, 0),(150001405, 1),(150001405, 2),(150001405, 3),(150001405, 4),(150001405, 5),(150001405, 6),(150001405, 7),(150001405, 8),(150001405, 9),(150001405, 10),
(150001405, 11),(150001405, 12),(150001405, 13),(150001405, 14),(150001405, 15),(150001405, 16),(150001405, 17),(150001405, 18),(150001405, 19),(150001405, 20),
(150001405, 21),(150001405, 22),(150001405, 23),(150001405, 24),(150001405, 25),(150001405, 26),(150001405, 27),(150001405, 28),(150001405, 29),(150001405, 30),
(150001405, 31),(150001405, 32),(150001405, 33),(150001405, 34),(150001405, 35),(150001405, 36),(150001405, 37),(150001405, 38),(150001405, 39),(150001405, 40),
(150001405, 41),(150001405, 42),(150001405, 43),(150001405, 44),(150001405, 45),(150001405, 46),(150001405, 47),(150001405, 48),(150001405, 49),(150001405, 50),
(150001405, 51),(150001405, 52),(150001405, 53),(150001405, 54),(150001405, 55),(150001405, 56),(150001405, 57),(150001405, 58),(150001405, 59),(150001405, 60),
(150001405, 61),(150001405, 62),(150001405, 63),(150001405, 64),(150001405, 65),(150001405, 66),(150001405, 67),(150001405, 68),(150001405, 69),(150001405, 70),
(150001405, 71),(150001405, 72),(150001405, 73),(150001405, 74),(150001405, 75),(150001405, 76),(150001405, 77),(150001405, 78),(150001405, 79),(150001405, 80),
(150001405, 81),(150001405, 82),(150001405, 83),(150001405, 84),(150001405, 85),(150001405, 86),(150001405, 87),(150001405, 88),(150001405, 89),(150001405, 90),
(150001405, 91),(150001405, 92),(150001405, 93),(150001405, 94),(150001405, 95),(150001405, 96),(150001405, 97),(150001405, 98),(150001405, 99),(150001405, 100),
(150001405, 101),(150001405, 102),(150001405, 103),(150001405, 104),(150001405, 105),(150001405, 106),(150001405, 107),(150001405, 108),(150001405, 109),(150001405, 110),
(150001405, 111),(150001405, 112),(150001405, 113),(150001405, 114),(150001405, 115),(150001405, 116),(150001405, 117),(150001405, 118),(150001405, 119),(150001405, 120),
(150001405, 121),(150001405, 122),(150001405, 123),(150001405, 124),(150001405, 125),(150001405, 126),(150001405, 127),(150001405, 128),(150001405, 129),(150001405, 130),
(150001405, 131),(150001405, 132),(150001405, 133),(150001405, 134),(150001405, 135),(150001405, 136),(150001405, 137),(150001405, 138),(150001405, 139),(150001405, 140),
(150001405, 141),(150001405, 142),(150001405, 143),(150001405, 144),(150001405, 145),(150001405, 146),(150001405, 147),(150001405, 148),(150001405, 149),(150001405, 150),
(150001406, 0),(150001406, 1),(150001406, 2),(150001406, 3),(150001406, 4),(150001406, 5),(150001406, 6),(150001406, 7),(150001406, 8),(150001406, 9),(150001406, 10),
(150001406, 11),(150001406, 12),(150001406, 13),(150001406, 14),(150001406, 15),(150001406, 16),(150001406, 17),(150001406, 18),(150001406, 19),(150001406, 20),
(150001406, 21),(150001406, 22),(150001406, 23),(150001406, 24),(150001406, 25),(150001406, 26),(150001406, 27),(150001406, 28),(150001406, 29),(150001406, 30),
(150001406, 31),(150001406, 32),(150001406, 33),(150001406, 34),(150001406, 35),(150001406, 36),(150001406, 37),(150001406, 38),(150001406, 39),(150001406, 40),
(150001406, 41),(150001406, 42),(150001406, 43),(150001406, 44),(150001406, 45),(150001406, 46),(150001406, 47),(150001406, 48),(150001406, 49),(150001406, 50),
(150001406, 51),(150001406, 52),(150001406, 53),(150001406, 54),(150001406, 55),(150001406, 56),(150001406, 57),(150001406, 58),(150001406, 59),(150001406, 60),
(150001406, 61),(150001406, 62),(150001406, 63),(150001406, 64),(150001406, 65),(150001406, 66),(150001406, 67),(150001406, 68),(150001406, 69),(150001406, 70),
(150001406, 71),(150001406, 72),(150001406, 73),(150001406, 74),(150001406, 75),(150001406, 76),(150001406, 77),(150001406, 78),(150001406, 79),(150001406, 80),
(150001406, 81),(150001406, 82),(150001406, 83),(150001406, 84),(150001406, 85),(150001406, 86),(150001406, 87),(150001406, 88),(150001406, 89),(150001406, 90),
(150001406, 91),(150001406, 92),(150001406, 93),(150001406, 94),(150001406, 95),(150001406, 96),(150001406, 97),(150001406, 98),(150001406, 99),(150001406, 100),
(150001406, 101),(150001406, 102),(150001406, 103),(150001406, 104),(150001406, 105),(150001406, 106),(150001406, 107),(150001406, 108),(150001406, 109),(150001406, 110),
(150001406, 111),(150001406, 112),(150001406, 113),(150001406, 114),(150001406, 115),(150001406, 116),(150001406, 117),(150001406, 118),(150001406, 119),(150001406, 120),
(150001406, 121),(150001406, 122),(150001406, 123),(150001406, 124),(150001406, 125),(150001406, 126),(150001406, 127),(150001406, 128),(150001406, 129),(150001406, 130),
(150001406, 131),(150001406, 132),(150001406, 133),(150001406, 134),(150001406, 135),(150001406, 136),(150001406, 137),(150001406, 138),(150001406, 139),(150001406, 140),
(150001406, 141),(150001406, 142),(150001406, 143),(150001406, 144),(150001406, 145),(150001406, 146),(150001406, 147),(150001406, 148),(150001406, 149),(150001406, 150),
(150001407, 0),(150001407, 1),(150001407, 2),(150001407, 3),(150001407, 4),(150001407, 5),(150001407, 6),(150001407, 7),(150001407, 8),(150001407, 9),(150001407, 10),
(150001407, 11),(150001407, 12),(150001407, 13),(150001407, 14),(150001407, 15),(150001407, 16),(150001407, 17),(150001407, 18),(150001407, 19),(150001407, 20),
(150001407, 21),(150001407, 22),(150001407, 23),(150001407, 24),(150001407, 25),(150001407, 26),(150001407, 27),(150001407, 28),(150001407, 29),(150001407, 30),
(150001407, 31),(150001407, 32),(150001407, 33),(150001407, 34),(150001407, 35),(150001407, 36),(150001407, 37),(150001407, 38),(150001407, 39),(150001407, 40),
(150001407, 41),(150001407, 42),(150001407, 43),(150001407, 44),(150001407, 45),(150001407, 46),(150001407, 47),(150001407, 48),(150001407, 49),(150001407, 50),
(150001407, 51),(150001407, 52),(150001407, 53),(150001407, 54),(150001407, 55),(150001407, 56),(150001407, 57),(150001407, 58),(150001407, 59),(150001407, 60),
(150001407, 61),(150001407, 62),(150001407, 63),(150001407, 64),(150001407, 65),(150001407, 66),(150001407, 67),(150001407, 68),(150001407, 69),(150001407, 70),
(150001407, 71),(150001407, 72),(150001407, 73),(150001407, 74),(150001407, 75),(150001407, 76),(150001407, 77),(150001407, 78),(150001407, 79),(150001407, 80),
(150001407, 81),(150001407, 82),(150001407, 83),(150001407, 84),(150001407, 85),(150001407, 86),(150001407, 87),(150001407, 88),(150001407, 89),(150001407, 90),
(150001407, 91),(150001407, 92),(150001407, 93),(150001407, 94),(150001407, 95),(150001407, 96),(150001407, 97),(150001407, 98),(150001407, 99),(150001407, 100),
(150001407, 101),(150001407, 102),(150001407, 103),(150001407, 104),(150001407, 105),(150001407, 106),(150001407, 107),(150001407, 108),(150001407, 109),(150001407, 110),
(150001407, 111),(150001407, 112),(150001407, 113),(150001407, 114),(150001407, 115),(150001407, 116),(150001407, 117),(150001407, 118),(150001407, 119),(150001407, 120),
(150001407, 121),(150001407, 122),(150001407, 123),(150001407, 124),(150001407, 125),(150001407, 126),(150001407, 127),(150001407, 128),(150001407, 129),(150001407, 130),
(150001407, 131),(150001407, 132),(150001407, 133),(150001407, 134),(150001407, 135),(150001407, 136),(150001407, 137),(150001407, 138),(150001407, 139),(150001407, 140),
(150001407, 141),(150001407, 142),(150001407, 143),(150001407, 144),(150001407, 145),(150001407, 146),(150001407, 147),(150001407, 148),(150001407, 149),(150001407, 150),
(150001408, 0),(150001408, 1),(150001408, 2),(150001408, 3),(150001408, 4),(150001408, 5),(150001408, 6),(150001408, 7),(150001408, 8),(150001408, 9),(150001408, 10),
(150001408, 11),(150001408, 12),(150001408, 13),(150001408, 14),(150001408, 15),(150001408, 16),(150001408, 17),(150001408, 18),(150001408, 19),(150001408, 20),
(150001408, 21),(150001408, 22),(150001408, 23),(150001408, 24),(150001408, 25),(150001408, 26),(150001408, 27),(150001408, 28),(150001408, 29),(150001408, 30),
(150001408, 31),(150001408, 32),(150001408, 33),(150001408, 34),(150001408, 35),(150001408, 36),(150001408, 37),(150001408, 38),(150001408, 39),(150001408, 40),
(150001408, 41),(150001408, 42),(150001408, 43),(150001408, 44),(150001408, 45),(150001408, 46),(150001408, 47),(150001408, 48),(150001408, 49),(150001408, 50),
(150001408, 51),(150001408, 52),(150001408, 53),(150001408, 54),(150001408, 55),(150001408, 56),(150001408, 57),(150001408, 58),(150001408, 59),(150001408, 60),
(150001408, 61),(150001408, 62),(150001408, 63),(150001408, 64),(150001408, 65),(150001408, 66),(150001408, 67),(150001408, 68),(150001408, 69),(150001408, 70),
(150001408, 71),(150001408, 72),(150001408, 73),(150001408, 74),(150001408, 75),(150001408, 76),(150001408, 77),(150001408, 78),(150001408, 79),(150001408, 80),
(150001408, 81),(150001408, 82),(150001408, 83),(150001408, 84),(150001408, 85),(150001408, 86),(150001408, 87),(150001408, 88),(150001408, 89),(150001408, 90),
(150001408, 91),(150001408, 92),(150001408, 93),(150001408, 94),(150001408, 95),(150001408, 96),(150001408, 97),(150001408, 98),(150001408, 99),(150001408, 100),
(150001408, 101),(150001408, 102),(150001408, 103),(150001408, 104),(150001408, 105),(150001408, 106),(150001408, 107),(150001408, 108),(150001408, 109),(150001408, 110),
(150001408, 111),(150001408, 112),(150001408, 113),(150001408, 114),(150001408, 115),(150001408, 116),(150001408, 117),(150001408, 118),(150001408, 119),(150001408, 120),
(150001408, 121),(150001408, 122),(150001408, 123),(150001408, 124),(150001408, 125),(150001408, 126),(150001408, 127),(150001408, 128),(150001408, 129),(150001408, 130),
(150001408, 131),(150001408, 132),(150001408, 133),(150001408, 134),(150001408, 135),(150001408, 136),(150001408, 137),(150001408, 138),(150001408, 139),(150001408, 140),
(150001408, 141),(150001408, 142),(150001408, 143),(150001408, 144),(150001408, 145),(150001408, 146),(150001408, 147),(150001408, 148),(150001408, 149),(150001408, 150),
(150001409, 0),(150001409, 1),(150001409, 2),(150001409, 3),(150001409, 4),(150001409, 5),(150001409, 6),(150001409, 7),(150001409, 8),(150001409, 9),(150001409, 10),
(150001409, 11),(150001409, 12),(150001409, 13),(150001409, 14),(150001409, 15),(150001409, 16),(150001409, 17),(150001409, 18),(150001409, 19),(150001409, 20),
(150001409, 21),(150001409, 22),(150001409, 23),(150001409, 24),(150001409, 25),(150001409, 26),(150001409, 27),(150001409, 28),(150001409, 29),(150001409, 30),
(150001409, 31),(150001409, 32),(150001409, 33),(150001409, 34),(150001409, 35),(150001409, 36),(150001409, 37),(150001409, 38),(150001409, 39),(150001409, 40),
(150001409, 41),(150001409, 42),(150001409, 43),(150001409, 44),(150001409, 45),(150001409, 46),(150001409, 47),(150001409, 48),(150001409, 49),(150001409, 50),
(150001409, 51),(150001409, 52),(150001409, 53),(150001409, 54),(150001409, 55),(150001409, 56),(150001409, 57),(150001409, 58),(150001409, 59),(150001409, 60),
(150001409, 61),(150001409, 62),(150001409, 63),(150001409, 64),(150001409, 65),(150001409, 66),(150001409, 67),(150001409, 68),(150001409, 69),(150001409, 70),
(150001409, 71),(150001409, 72),(150001409, 73),(150001409, 74),(150001409, 75),(150001409, 76),(150001409, 77),(150001409, 78),(150001409, 79),(150001409, 80),
(150001409, 81),(150001409, 82),(150001409, 83),(150001409, 84),(150001409, 85),(150001409, 86),(150001409, 87),(150001409, 88),(150001409, 89),(150001409, 90),
(150001409, 91),(150001409, 92),(150001409, 93),(150001409, 94),(150001409, 95),(150001409, 96),(150001409, 97),(150001409, 98),(150001409, 99),(150001409, 100),
(150001409, 101),(150001409, 102),(150001409, 103),(150001409, 104),(150001409, 105),(150001409, 106),(150001409, 107),(150001409, 108),(150001409, 109),(150001409, 110),
(150001409, 111),(150001409, 112),(150001409, 113),(150001409, 114),(150001409, 115),(150001409, 116),(150001409, 117),(150001409, 118),(150001409, 119),(150001409, 120),
(150001409, 121),(150001409, 122),(150001409, 123),(150001409, 124),(150001409, 125),(150001409, 126),(150001409, 127),(150001409, 128),(150001409, 129),(150001409, 130),
(150001409, 131),(150001409, 132),(150001409, 133),(150001409, 134),(150001409, 135),(150001409, 136),(150001409, 137),(150001409, 138),(150001409, 139),(150001409, 140),
(150001409, 141),(150001409, 142),(150001409, 143),(150001409, 144),(150001409, 145),(150001409, 146),(150001409, 147),(150001409, 148),(150001409, 149),(150001409, 150),
(150001410, 0),(150001410, 1),(150001410, 2),(150001410, 3),(150001410, 4),(150001410, 5),(150001410, 6),(150001410, 7),(150001410, 8),(150001410, 9),(150001410, 10),
(150001410, 11),(150001410, 12),(150001410, 13),(150001410, 14),(150001410, 15),(150001410, 16),(150001410, 17),(150001410, 18),(150001410, 19),(150001410, 20),
(150001410, 21),(150001410, 22),(150001410, 23),(150001410, 24),(150001410, 25),(150001410, 26),(150001410, 27),(150001410, 28),(150001410, 29),(150001410, 30),
(150001410, 31),(150001410, 32),(150001410, 33),(150001410, 34),(150001410, 35),(150001410, 36),(150001410, 37),(150001410, 38),(150001410, 39),(150001410, 40),
(150001410, 41),(150001410, 42),(150001410, 43),(150001410, 44),(150001410, 45),(150001410, 46),(150001410, 47),(150001410, 48),(150001410, 49),(150001410, 50),
(150001410, 51),(150001410, 52),(150001410, 53),(150001410, 54),(150001410, 55),(150001410, 56),(150001410, 57),(150001410, 58),(150001410, 59),(150001410, 60),
(150001410, 61),(150001410, 62),(150001410, 63),(150001410, 64),(150001410, 65),(150001410, 66),(150001410, 67),(150001410, 68),(150001410, 69),(150001410, 70),
(150001410, 71),(150001410, 72),(150001410, 73),(150001410, 74),(150001410, 75),(150001410, 76),(150001410, 77),(150001410, 78),(150001410, 79),(150001410, 80),
(150001410, 81),(150001410, 82),(150001410, 83),(150001410, 84),(150001410, 85),(150001410, 86),(150001410, 87),(150001410, 88),(150001410, 89),(150001410, 90),
(150001410, 91),(150001410, 92),(150001410, 93),(150001410, 94),(150001410, 95),(150001410, 96),(150001410, 97),(150001410, 98),(150001410, 99),(150001410, 100),
(150001410, 101),(150001410, 102),(150001410, 103),(150001410, 104),(150001410, 105),(150001410, 106),(150001410, 107),(150001410, 108),(150001410, 109),(150001410, 110),
(150001410, 111),(150001410, 112),(150001410, 113),(150001410, 114),(150001410, 115),(150001410, 116),(150001410, 117),(150001410, 118),(150001410, 119),(150001410, 120),
(150001410, 121),(150001410, 122),(150001410, 123),(150001410, 124),(150001410, 125),(150001410, 126),(150001410, 127),(150001410, 128),(150001410, 129),(150001410, 130),
(150001410, 131),(150001410, 132),(150001410, 133),(150001410, 134),(150001410, 135),(150001410, 136),(150001410, 137),(150001410, 138),(150001410, 139),(150001410, 140),
(150001410, 141),(150001410, 142),(150001410, 143),(150001410, 144),(150001410, 145),(150001410, 146),(150001410, 147),(150001410, 148),(150001410, 149),(150001410, 150),
(150001411, 0),(150001411, 1),(150001411, 2),(150001411, 3),(150001411, 4),(150001411, 5),(150001411, 6),(150001411, 7),(150001411, 8),(150001411, 9),(150001411, 10),
(150001411, 11),(150001411, 12),(150001411, 13),(150001411, 14),(150001411, 15),(150001411, 16),(150001411, 17),(150001411, 18),(150001411, 19),(150001411, 20),
(150001411, 21),(150001411, 22),(150001411, 23),(150001411, 24),(150001411, 25),(150001411, 26),(150001411, 27),(150001411, 28),(150001411, 29),(150001411, 30),
(150001411, 31),(150001411, 32),(150001411, 33),(150001411, 34),(150001411, 35),(150001411, 36),(150001411, 37),(150001411, 38),(150001411, 39),(150001411, 40),
(150001411, 41),(150001411, 42),(150001411, 43),(150001411, 44),(150001411, 45),(150001411, 46),(150001411, 47),(150001411, 48),(150001411, 49),(150001411, 50),
(150001411, 51),(150001411, 52),(150001411, 53),(150001411, 54),(150001411, 55),(150001411, 56),(150001411, 57),(150001411, 58),(150001411, 59),(150001411, 60),
(150001411, 61),(150001411, 62),(150001411, 63),(150001411, 64),(150001411, 65),(150001411, 66),(150001411, 67),(150001411, 68),(150001411, 69),(150001411, 70),
(150001411, 71),(150001411, 72),(150001411, 73),(150001411, 74),(150001411, 75),(150001411, 76),(150001411, 77),(150001411, 78),(150001411, 79),(150001411, 80),
(150001411, 81),(150001411, 82),(150001411, 83),(150001411, 84),(150001411, 85),(150001411, 86),(150001411, 87),(150001411, 88),(150001411, 89),(150001411, 90),
(150001411, 91),(150001411, 92),(150001411, 93),(150001411, 94),(150001411, 95),(150001411, 96),(150001411, 97),(150001411, 98),(150001411, 99),(150001411, 100),
(150001411, 101),(150001411, 102),(150001411, 103),(150001411, 104),(150001411, 105),(150001411, 106),(150001411, 107),(150001411, 108),(150001411, 109),(150001411, 110),
(150001411, 111),(150001411, 112),(150001411, 113),(150001411, 114),(150001411, 115),(150001411, 116),(150001411, 117),(150001411, 118),(150001411, 119),(150001411, 120),
(150001411, 121),(150001411, 122),(150001411, 123),(150001411, 124),(150001411, 125),(150001411, 126),(150001411, 127),(150001411, 128),(150001411, 129),(150001411, 130),
(150001411, 131),(150001411, 132),(150001411, 133),(150001411, 134),(150001411, 135),(150001411, 136),(150001411, 137),(150001411, 138),(150001411, 139),(150001411, 140),
(150001411, 141),(150001411, 142),(150001411, 143),(150001411, 144),(150001411, 145),(150001411, 146),(150001411, 147),(150001411, 148),(150001411, 149),(150001411, 150),
(150001412, 0),(150001412, 1),(150001412, 2),(150001412, 3),(150001412, 4),(150001412, 5),(150001412, 6),(150001412, 7),(150001412, 8),(150001412, 9),(150001412, 10),
(150001412, 11),(150001412, 12),(150001412, 13),(150001412, 14),(150001412, 15),(150001412, 16),(150001412, 17),(150001412, 18),(150001412, 19),(150001412, 20),
(150001412, 21),(150001412, 22),(150001412, 23),(150001412, 24),(150001412, 25),(150001412, 26),(150001412, 27),(150001412, 28),(150001412, 29),(150001412, 30),
(150001412, 31),(150001412, 32),(150001412, 33),(150001412, 34),(150001412, 35),(150001412, 36),(150001412, 37),(150001412, 38),(150001412, 39),(150001412, 40),
(150001412, 41),(150001412, 42),(150001412, 43),(150001412, 44),(150001412, 45),(150001412, 46),(150001412, 47),(150001412, 48),(150001412, 49),(150001412, 50),
(150001412, 51),(150001412, 52),(150001412, 53),(150001412, 54),(150001412, 55),(150001412, 56),(150001412, 57),(150001412, 58),(150001412, 59),(150001412, 60),
(150001412, 61),(150001412, 62),(150001412, 63),(150001412, 64),(150001412, 65),(150001412, 66),(150001412, 67),(150001412, 68),(150001412, 69),(150001412, 70),
(150001412, 71),(150001412, 72),(150001412, 73),(150001412, 74),(150001412, 75),(150001412, 76),(150001412, 77),(150001412, 78),(150001412, 79),(150001412, 80),
(150001412, 81),(150001412, 82),(150001412, 83),(150001412, 84),(150001412, 85),(150001412, 86),(150001412, 87),(150001412, 88),(150001412, 89),(150001412, 90),
(150001412, 91),(150001412, 92),(150001412, 93),(150001412, 94),(150001412, 95),(150001412, 96),(150001412, 97),(150001412, 98),(150001412, 99),(150001412, 100),
(150001412, 101),(150001412, 102),(150001412, 103),(150001412, 104),(150001412, 105),(150001412, 106),(150001412, 107),(150001412, 108),(150001412, 109),(150001412, 110),
(150001412, 111),(150001412, 112),(150001412, 113),(150001412, 114),(150001412, 115),(150001412, 116),(150001412, 117),(150001412, 118),(150001412, 119),(150001412, 120),
(150001412, 121),(150001412, 122),(150001412, 123),(150001412, 124),(150001412, 125),(150001412, 126),(150001412, 127),(150001412, 128),(150001412, 129),(150001412, 130),
(150001412, 131),(150001412, 132),(150001412, 133),(150001412, 134),(150001412, 135),(150001412, 136),(150001412, 137),(150001412, 138),(150001412, 139),(150001412, 140),
(150001412, 141),(150001412, 142),(150001412, 143),(150001412, 144),(150001412, 145),(150001412, 146),(150001412, 147),(150001412, 148),(150001412, 149),(150001412, 150);
 
select aa.guardian_stone_code
	  , aa.`level`
	  , count(aa.enhance_level)
  from (
  			select a.`level`
			  	  , a.guardian_stone_code
			  	  , b.enhance_level
			  from eod_game.temp_enhance_level a
			  left outer join eod_game.table_guardian_stone b
			    on a.`guardian_stone_code` = b.`guardian_stone_code`
			   and a.`level` = b.enhance_level
  		 ) aa
 group by aa.guardian_stone_code, aa.`level`;
 
