-- 계정 생성 현황
SELECT * FROM `eod_authentication`.`table_account_user` 
WHERE (`join_datetime` BETWEEN '2017-06-21 00:00:00' AND '2017-07-05 23:59:59') AND 
      (`nickname` NOT LIKE '[empty]%');



-- 계정 + 캐릭터 생성 현황
SELECT 
	accountTable.`user_id`,
	`nickname`,
	`character_id`,
	`character_class_type`,
    `level`,
    `experience`,table_application_contract
    `guardian_level`,
    `guardian_experience`,
	`join_datetime` AS account_generate_datetime,
	`last_played_datetime` AS character_generate_datetime
FROM `eod_authentication`.`table_account_user` AS accountTable
INNER JOIN
(
	SELECT 
		`user_id`, 
        `character_id`,
		`character_class_type`, 
        `level`,
        `experience`,
        `guardian_level`,
        `guardian_experience`,
		`last_played_datetime`
	FROM `eod_game`.`table_player` AS playerTable
	INNER JOIN
	(
		SELECT 
			`character_id`, 
            `owner_user_id`,
			`character_class_type`, 
            `level`,
            `experience`,
			`last_played_datetime`
		FROM `eod_game`.`table_player_character` AS characterTable
		WHERE (`last_played_datetime` BETWEEN '2017-06-21 00:00:00' AND '2017-07-05 23:59:59')
	) AS selectedPlayerTable
	ON (playerTable.`user_id` = selectedPlayerTable.`owner_user_id`)
) AS selectedAccountTable
ON (accountTable.`user_id` = selectedAccountTable.`user_id`) AND
   (accountTable.`join_datetime` BETWEEN '2017-06-21 00:00:00' AND '2017-07-05 23:59:59')
ORDER BY accountTable.`user_id`;