transfer emotional map sql query from api.php