-- ================================================================================

-- `eod_game`

-- ================================================================================


-- ----------------------------------------
-- [`table_achievement`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_achievement` WHERE (`user_id` = 1) AND (`character_id` = 1);
DESCRIBE DELETE FROM `eod_game`.`table_achievement` WHERE (`user_id` = 1);

SELECT * FROM `eod_game`.`table_achievement` 
WHERE (`user_id` = 59);

SELECT * FROM `eod_game`.`table_achievement` 
WHERE (`user_id` = 23) AND (`character_id` = 21);

SELECT * FROM `eod_game`.`table_achievement` 
WHERE (`user_id` = 23) AND 
      (`character_id` = 0) AND 
      (`achievement_code` BETWEEN 908221001 AND 908221040);
      
SELECT COUNT(1) FROM `eod_game`.`table_achievement` 
WHERE (`character_id` <> 0) AND 
      (`achievement_code` BETWEEN 908221001 AND 908221040);

DESCRIBE DELETE FROM `eod_game`.`table_achievement` 
WHERE (`achievement_code` > 908231000);


-- ----------------------------------------
-- [`table_achievement_record`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_achievement_record` WHERE (`user_id` = 23);
SELECT * FROM `eod_game`.`table_achievement_record` WHERE (`user_id` = 190) AND (`character_id` = 339);
SELECT * FROM `eod_game`.`table_achievement_record` WHERE (`user_id` = 145) AND (`character_id` = 186);

SELECT * FROM `eod_game`.`table_achievement_record` 
WHERE (`user_id` = 1) AND 
      (`character_id` = 173) AND
      (`group_high` = 9);


DESCRIBE DELETE FROM `eod_game`.`table_achievement_record` WHERE (`user_id` = 1) AND (`character_id` = 0);
DESCRIBE DELETE FROM `eod_game`.`table_achievement_record` 
WHERE (`group_high` = 7) AND (`group_mid` = 1);

-- `group_low`가 음수인 경우
SELECT * FROM `eod_game`.`table_achievement_record`
WHERE (`group_low` < 0) LIMIT 1000;


-- ----------------------------------------
-- [`table_attendance_special`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_attendance_special` WHERE (`character_id` 
IN(179));

SELECT * FROM `eod_game`.`table_attendance_special` WHERE (`event_code` = 1003) AND (`attendance_count` > 1);
SELECT * FROM `eod_game`.`table_attendance_special` WHERE (`event_code` = 1003) AND (`attendance_count` > 0);



-- ----------------------------------------
-- [`table_avatar_item`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_avatar_item` WHERE (`character_id` = 1);
DESCRIBE DELETE FROM `eod_game`.`table_avatar_item` WHERE (`character_id` = 75);


-- ----------------------------------------
-- [`table_avatar_item_equipped`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_avatar_item_equipped` WHERE (`character_id` = 317);
DESCRIBE DELETE FROM `eod_game`.`table_avatar_item_equipped` WHERE (`character_id` = 75);


-- ----------------------------------------
-- [`table_equipment_item`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_equipment_item` WHERE (`item_id` = 479);

-- 최대 부여한 아이템의 ID
SELECT MAX(`item_id`) FROM `eod_game`.`table_equipment_item`;

-- 보유한 활성 아이템들 가져오기
SELECT * FROM `eod_game`.`table_equipment_item` WHERE (`owner_character_id` = 10000000000053899) AND (`state` = 0) LIMIT 1000;

SELECT COUNT(1) FROM `eod_game`.`table_equipment_item` WHERE (`state` = 1);

-- 옵션 계수가 0보다 큰 아이템들의 존재 유무
SELECT COUNT(1) FROM `eod_game`.`table_equipment_item` WHERE (`option_factor` > 0);

SELECT * FROM `eod_game`.`table_equipment_item` WHERE (`item_id` = 26263611);

SELECT * FROM `eod_game`.`table_equipment_item` WHERE (`owner_character_id` = 61);
DESCRIBE DELETE FROM `eod_game`.`table_equipment_item`;

SELECT COUNT(1) FROM `eod_game`.`table_equipment_item` WHERE (`option_factor` > 0);

SELECT * FROM `eod_game`.`table_equipment_item`
WHERE (`creation_datetime` BETWEEN '2017-06-01 00:00:00' AND '2017-06-22 23:59:59') AND (`state` = 0)
LIMIT 1000;


SELECT * FROM `eod_game`.`table_equipment_item`
WHERE (`option_factor` > 7)
ORDER BY `option_factor`;


-- ----------------------------------------
-- [`table_equipment_item_equipped`]
-- ----------------------------------------

-- 특정 캐릭터의 아이템 장착 정보
SELECT * FROM `eod_game`.`table_equipment_item_equipped` WHERE (`character_id` = 1);

SELECT * FROM `eod_game`.`table_equipment_item_equipped` WHERE 1;
DESCRIBE DELETE FROM `eod_game`.`table_equipment_item_equipped` WHERE (`character_id` != 0) AND (`equip_slot_type` = 0);



-- ----------------------------------------
-- [`table_guardian_stone`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_guardian_stone` WHERE (`character_id` = 285);
DESCRIBE DELETE FROM `eod_game`.`table_guardian_stone` WHERE (`character_id` = 75);


-- ----------------------------------------
-- [`table_guardian_stone_equipped`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_guardian_stone_equipped` WHERE (`character_id` = 285);
DESCRIBE DELETE FROM `eod_game`.`table_guardian_stone_equipped` WHERE (`character_id` = 47);



-- ----------------------------------------
-- [`table_mission`]
-- ----------------------------------------

-- 특정 캐릭터의 미션 데이터 가져오기
SELECT * FROM `eod_game`.`table_mission` WHERE (`character_id` = 23816);

-- 특정 캐릭터의 특정 미션 데이터 가져오기
SELECT * FROM `eod_game`.`table_mission` WHERE (`character_id` = 1) AND (`mission_code` IN(703411001));

-- 특정 캐릭터의 미션 데이터들 지우기
DESCRIBE DELETE FROM `eod_game`.`table_mission` WHERE (`character_id` = 1);

SELECT * FROM `eod_game`.`table_mission` 
WHERE (`expired_datetime` = '2017-03-01 00:00:00')
ORDER BY `character_id`;

SELECT * FROM `eod_game`.`table_mission` 
WHERE (`expired_datetime` = '2017-04-10 00:00:00')
ORDER BY `character_id`;

SELECT * FROM `eod_game`.`table_mission` 
WHERE (`mission_code` BETWEEN 300000000 AND 399999999) AND (`expired_datetime` = '2017-04-01 00:00:00') 
ORDER BY `character_id`, `mission_code`;

SELECT * FROM `eod_game`.`table_mission` 
WHERE (`character_id` = 23816) AND
      (`mission_code` BETWEEN 700000000 AND 799999999);
      
SELECT * FROM `eod_game`.`table_mission` 
WHERE (`character_id` IN(47094, 48589, 50695, 51411, 53533)) AND
      (`mission_code` BETWEEN 300000000 AND 399999999)
ORDER BY `character_id`, `mission_code`;
      
      
SELECT `expired_datetime` FROM `eod_game`.`table_mission` 
WHERE (`mission_code` BETWEEN 300000000 AND 399999999) AND (`expired_datetime` < '2017-05-01 00:00:00')
ORDER BY `expired_datetime` DESC LIMIT 100;

SELECT * FROM `eod_game`.`table_player_character` AS characterTable
INNER JOIN
(
    SELECT `character_id` FROM `eod_game`.`table_mission` 
    WHERE (`mission_code` BETWEEN 300000000 AND 399999999) AND (`expired_datetime` = '2017-04-01 00:00:00')
) AS missionTable
ON (`characterTable`.`character_id` = `missionTable`.`character_id`) AND (`last_played_datetime` < '2017-03-24 14:00:00')
GROUP BY `characterTable`.`character_id`
ORDER BY `owner_user_id`;


SELECT 
    `user_id`, 
    `nickname`, 
    `join_datetime` 
FROM `eod_authentication`.`table_account_user` AS playerTable
INNER JOIN
(
    SELECT 
        `characterTable`.`character_id`, 
        `characterTable`.`owner_user_id`, 
        `characterTable`.`character_class_type`, 
        `characterTable`.`level`
    FROM `eod_game`.`table_player_character` AS characterTable
    INNER JOIN
    (
        SELECT `character_id` 
        FROM `eod_game`.`table_mission` 
        WHERE (`mission_code` BETWEEN 300000000 AND 399999999) AND (`expired_datetime` = '2017-04-01 00:00:00')
    ) AS missionTable
    ON (`characterTable`.`character_id` = `missionTable`.`character_id`)
    GROUP BY `characterTable`.`character_id`
) AS t1
ON (`playerTable`.`user_id` = `t1`.`owner_user_id`) AND (`playerTable`.`join_datetime` < '2017-03-25 00:00:00')
GROUP BY `user_id`
ORDER BY `user_id`;



-- ----------------------------------------
-- [`table_occupation_war_record`]
-- ----------------------------------------


-- ----------------------------------------
-- [`table_occupation_war_reward`]
-- ----------------------------------------


-- ----------------------------------------
-- [`table_pet`]
-- ----------------------------------------


-- ----------------------------------------
-- [`table_pet_decoration`]
-- ----------------------------------------


-- ----------------------------------------
-- [`table_player`]
-- ----------------------------------------

-- 플레이어의 개수
SELECT COUNT(1) FROM `eod_game`.`table_player` WHERE 1;

-- 사용자 ID로 플레이어 찾기
SELECT * FROM `eod_game`.`table_player` WHERE (`user_id` = 57);
SELECT * FROM `eod_game`.`table_player` WHERE (`user_id` = 20000000000057696);

-- 사용자 이름으로 플레이어 찾기
SELECT * FROM `eod_game`.`table_player` WHERE (`nickname` = '하기스베이비1');
SELECT * FROM `eod_game`.`table_player` WHERE (`nickname` = '눈길');
SELECT * FROM `eod_game`.`table_player` WHERE (`nickname` IN('비단버섯', '블랙', '포스틱'));
SELECT * FROM `eod_game`.`table_player`  
WHERE (`user_id` IN (SELECT `owner_user_id` FROM `eod_game`.`table_player_character` WHERE (`character_id` IN (61))));
#DESCRIBE DELETE FROM `eod_game`.`table_player` WHERE (`user_id` = 30);

-- 플레이어 캐릭터 번호로 계정 찾기
SELECT * FROM `eod_game`.`table_player` 
WHERE (`user_id` = (SELECT `owner_user_id` FROM `eod_game`.`table_player_character` WHERE (`character_id` IN (32))));

-- 수호자 레벨 높은 순으로...
SELECT * FROM `eod_game`.`table_player` 
ORDER BY `guardian_level` DESC
LIMIT 100;

-- Facebook 계정 연동 해제
EXPLAIN UPDATE `eod_game`.`table_player`
SET
    `related_account_facebook` = ''
WHERE (`user_id` IN(7697));



-- ----------------------------------------
-- [`table_player_character`]
-- ----------------------------------------

-- 특정 레벨 이상의 캐릭터 개수
SELECT COUNT(1) FROM `eod_game`.`table_player_character` WHERE (`level` >= 1);

SELECT 
    `character_id`, 
    `owner_user_id`,
    `character_class_type`,
    `level`
FROM `eod_game`.`table_player_character`
ORDER BY `owner_user_id`;

-- 플레이어 닉네임 + 캐릭터 정보
SELECT 
    `characterTable`.`owner_user_id`,
    `playerTable`.`nickname`,
    `characterTable`.`character_id`, 
    `characterTable`.`character_class_type`,
    `characterTable`.`level`
FROM `eod_game`.`table_player_character` AS `characterTable`
INNER JOIN
(
    SELECT `user_id`, `nickname` FROM `eod_game`.`table_player`
) AS playerTable
ON (`characterTable`.`owner_user_id` = `playerTable`.`user_id`);

-- 사용자 ID의 플레이어 캐릭터들 찾기
SELECT * FROM `eod_game`.`table_player_character` WHERE (`owner_user_id` = 1);
SELECT * FROM `eod_game`.`table_player_character` WHERE (`owner_user_id` IN(190));

SELECT * FROM `eod_game`.`table_player_character` WHERE (`character_id` = 112792);
SELECT * FROM `eod_game`.`table_player_character` WHERE (`character_id` = 20000000000061566);

-- 특정 사용자 이름의 플레이어 캐릭터들 전부 가져오기
SELECT * FROM `eod_game`.`table_player_character` AS tableCharacter
INNER JOIN
(
    SELECT `user_id` FROM `eod_game`.`table_player` WHERE (`nickname` IN('하기스베이비1'))
) AS tablePlayer
ON (`tableCharacter`.`owner_user_id` = `tablePlayer`.`user_id`);


-- 특정 사용자 이름의 플레이어 캐릭터들 전부 가져오기
SELECT * FROM `eod_game`.`table_player` AS tablePlayer
INNER JOIN
(
    SELECT `character_id`, `owner_user_id` FROM `eod_game`.`table_player_character` WHERE (`character_id` IN(10000000000043038))
) AS selectedCharacterTable
ON (tablePlayer.`user_id` = selectedCharacterTable.`owner_user_id`);



SELECT * FROM `eod_game`.`table_player` 
ORDER BY `money_gamecash_by_bonus` + `money_gamecash_by_purchase` DESC LIMIT 100;

SELECT * FROM `eod_game`.`table_player_character` 
ORDER BY `level` DESC LIMIT 100;

SELECT * FROM `eod_game`.`table_player` AS table1 WHERE (`user_id` = (SELECT `owner_user_id` FROM `eod_game`.`table_player_character` AS table2))
ORDER BY `table2`.`money_gameplay` DESC LIMIT 100;



-- ----------------------------------------
-- [`table_post`]
-- ----------------------------------------

-- 현재까지 부여된 가장 높은 ID 값
SELECT MAX(`no`) FROM `eod_game`.`table_post`;

SELECT * FROM `eod_game`.`table_post` WHERE (`no` = 5567);

SELECT * FROM `eod_game`.`table_post` WHERE (`receiver_id` = 5567) 
ORDER BY `no` DESC
LIMIT 1000;

DESCRIBE DELETE FROM `eod_game`.`table_post` WHERE (`receiver_id` = 101);

SELECT * FROM `eod_game`.`table_post` 
WHERE (`receiver_id` = 43990)
ORDER BY `no` DESC;


SELECT * FROM `eod_game`.`table_post` 
WHERE (`receiver_character_id` = 122926) AND 
      (`received_datetime` BETWEEN '2017-07-18 19:00:00' AND '2017-07-18 19:04:59')
ORDER BY `no` DESC;


SELECT * FROM `eod_game`.`table_post` WHERE (`no` = 327);
SELECT * FROM `eod_game`.`table_post` WHERE (`receiver_character_id` = 1) ORDER BY `received_datetime` DESC LIMIT 100;
SELECT * FROM `eod_game`.`table_post` WHERE (`receiver_character_id` = 278) AND (`state` = 0) ORDER BY `received_datetime` DESC LIMIT 100;

SELECT COUNT(1) FROM `eod_game`.`table_post` 
WHERE (`receiver_id` = 10000000000007096) AND (`state` = 0) AND (`item_code` = 156113006)
ORDER BY `received_datetime` DESC LIMIT 100;


SELECT * FROM `eod_game`.`table_post`
WHERE (`receiver_character_id` = ) AND (`item_code` = 156113006) AND



-- ----------------------------------------
-- [`table_quest`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_quest` WHERE (`character_id` = 126);


-- ----------------------------------------
-- [`table_servant`]
-- ----------------------------------------

-- 특정 캐릭터의 조력자 찾기
SELECT * FROM `eod_game`.`table_servant` WHERE (`character_id` = 1);
DESCRIBE DELETE FROM `eod_game`.`table_servant` WHERE 1;


-- ----------------------------------------
-- [`table_servant_equipped`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_servant_equipped` WHERE (`character_id` = 467);


-- ----------------------------------------
-- [`table_servant_collection_reward`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_servant_collection_reward` WHERE (`character_id` = 68);


-- ----------------------------------------
-- [`table_shop_buy_count`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_shop_buy_count` WHERE (`user_id` = 10000000000002640) AND (`product_code` = 201602046);

SELECT * FROM `eod_game`.`table_shop_buy_count` WHERE (`user_id` = 65) AND (`character_id` = 216);

SELECT * FROM `eod_game`.`table_shop_buy_count` WHERE (`user_id` = 10000000000000029) ORDER BY `product_code`;


-- ----------------------------------------
-- [`table_skill`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_skill` WHERE (`character_id` = 95);
DESCRIBE DELETE FROM `eod_game`.`table_skill` WHERE (`character_id` = 95);


-- ----------------------------------------
-- [`table_skill_equipped`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_skill_equipped` WHERE (`character_id` = 94);


-- ----------------------------------------
-- [`table_stage_elite_accomplishment`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_stage_elite_accomplishment` WHERE 1;

SELECT * FROM `eod_game`.`table_stage_elite_accomplishment` WHERE (`character_id` = 92) AND (`act_number` = 1);
DESCRIBE DELETE FROM  `eod_game`.`table_stage_elite_accomplishment` WHERE 1;
SELECT * FROM `eod_game`.`table_stage_elite_act_record` WHERE (`character_id` = 92);

-- 특정 액트의 특정 스테이지를 완료한 캐릭터 찾기
SELECT * FROM `eod_game`.`table_stage_elite_accomplishment`
WHERE (`act_number` = 8) AND 
      (`stage_number_in_act` > 0) AND 
      (`clear_grade` >= 3);
      
-- 특정 액트의 특정 스테이지를 완료한 캐릭터의 정보 가져오기
SELECT * FROM `eod_game`.`table_player_character` AS characterTable
INNER JOIN
(
    SELECT `character_id` FROM `eod_game`.`table_stage_elite_accomplishment`
    WHERE (`act_number` = 8) AND 
          (`stage_number_in_act` > 0) AND 
          (`clear_grade` >= 3)
) AS stageClearTable
ON (`characterTable`.`character_id` = `stageClearTable`.`character_id`)
GROUP BY `characterTable`.`character_id`;



-- ----------------------------------------
-- [`table_stage_elite_act_record`]
-- ----------------------------------------



-- ----------------------------------------
-- [`table_stage_guardian_raid_accomplishment`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_stage_guardian_raid_accomplishment` WHERE (`user_id` = 3);


-- ----------------------------------------
-- [`table_stage_occupation_war_accomplishment`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_stage_occupation_war_accomplishment` WHERE (`user_id` = 293);
SELECT * FROM `eod_game`.`table_stage_occupation_war_accomplishment` WHERE 1;


-- ----------------------------------------
-- [`table_stage_normal_accomplishment`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_stage_normal_accomplishment` WHERE (`character_id` = 10000000000053899) AND (`act_number` = 9);

SELECT * FROM `eod_game`.`table_stage_normal_accomplishment` 
WHERE (`character_id` = 45977) AND
      (`act_number` = 2) AND
      (`stage_number_in_act` = 4);
      
-- 특정 액트의 특정 스테이지를 완료한 캐릭터 찾기
SELECT * FROM `eod_game`.`table_stage_normal_accomplishment`
WHERE (`act_number` = 9) AND 
      (`stage_number_in_act` > 0) AND 
      (`clear_grade` >= 3);
      
-- 특정 액트의 특정 스테이지를 완료한 캐릭터의 정보 가져오기
SELECT * FROM `eod_game`.`table_player_character` AS characterTable
INNER JOIN
(
    SELECT `character_id` FROM `eod_game`.`table_stage_normal_accomplishment`
    WHERE (`act_number` = 9) AND 
          (`stage_number_in_act` > 0) AND 
          (`clear_grade` >= 3)
) AS stageClearTable
ON (`characterTable`.`character_id` = `stageClearTable`.`character_id`)
GROUP BY `characterTable`.`character_id`;

SELECT * FROM `eod_game`.`table_player` WHERE (`user_id` = 10000000000000860);


DESCRIBE DELETE FROM  `eod_game`.`table_stage_normal_accomplishment` WHERE 1;


-- ----------------------------------------
-- [`table_stage_normal_act_record`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_stage_normal_act_record` WHERE (`character_id` = 1);
DESCRIBE DELETE FROM `eod_game`.`table_stage_normal_act_record` WHERE (`character_id` = 57);


-- ----------------------------------------
-- [`table_stage_record`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_stage_record` WHERE (`character_id` = 3);
SELECT * FROM `eod_game`.`table_stage_record` WHERE (`normal_last_played_act_number` > 8);
SELECT 
    `character_id`,
    `arena_async_auth_number`, 
    `arena_async_start_datetime`,     
    `arena_async_remain_play_count`, 
    `arena_async_play_count_max`, 
    `arena_async_reset_count`, 
    `arena_async_reset_datetime`, 
	`arena_async_straight_win_count`, 
	`arena_async_straight_defeat_count`, 
	`update_datetime`
FROM `eod_game`.`table_stage_record` WHERE (`character_id` = 1);
UPDATE `eod_game`.`table_stage_record`
SET
    `arena_async_reset_count` = 5,
    `arena_async_remain_play_count` = 0
WHERE (`character_id` = 68);
SELECT * FROM `eod_game`.`table_stage_record` WHERE (`character_id` = 17);
SELECT * FROM `eod_game`.`table_stage_record` 
WHERE (`normal_far_played_act_number` = 8) AND (`normal_far_played_stage_number_in_act` >= 1) 
ORDER BY `normal_far_played_stage_number_in_act` DESC 
LIMIT 100;
DESCRIBE DELETE FROM  `eod_game`.`table_stage_record` WHERE (`character_id` = 1);


-- ----------------------------------------
-- [`table_stage_rift_accomplishment`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_stage_rift_accomplishment` WHERE (`character_id` = 69);
DESCRIBE DELETE FROM  `eod_game`.`table_stage_rift_accomplishment` WHERE 1;

SELECT * FROM `eod_game`.`table_stage_rift_accomplishment` 
WHERE (`character_id` = 69);


-- ----------------------------------------
-- [`table_stage_transcendence_accomplishment`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_stage_transcendence_accomplishment` WHERE (`character_id` = 68);
DESCRIBE DELETE FROM  `eod_game`.`table_stage_transcendence_accomplishment` WHERE 1;

-- 특정 단계의 초월 레벨 찾기
SELECT * FROM `eod_game`.`table_stage_transcendence_accomplishment` WHERE (`stage_grade` = 120) LIMIT 1000;


-- ----------------------------------------
-- [`table_stage_weekly_accomplishment`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_stage_weekly_accomplishment` WHERE 1;
DESCRIBE DELETE FROM  `eod_game`.`table_stage_weekly_accomplishment` WHERE 1;


-- ----------------------------------------
-- [`table_tutorial`]
-- ----------------------------------------

SELECT * FROM `eod_game`.`table_tutorial` WHERE (`character_id` IN (3265, 3266, 3267));


-- ----------------------------------------
-- [`table_worth`]
-- ----------------------------------------

SELECT COUNT(1) FROM `eod_game`.`table_worth` WHERE (`character_id` = 3);

SELECT * FROM `eod_game`.`table_worth` WHERE (`character_id` = 3);
SELECT * FROM `eod_game`.`table_worth` WHERE (`character_id` = 3) AND (`worth_code` = 160004005);

SELECT * FROM `eod_game`.`table_worth` 
WHERE (`character_id` = 1);

SELECT * FROM `eod_game`.`table_worth` 
WHERE (`character_id` = 115) AND (`worth_code` BETWEEN 160003101 AND 160003108);