{% extends "admin/base.html" %} {% block admin_title %}查询控制台{% endblock %} {% block page_title %}只读查询控制台{% endblock %} {% block page_subtitle %}探索 L2 事实、L3 集市和 Web 状态,不允许任何写操作{% endblock %} {% block admin_content %}

SQL Editor

仅支持单条 SELECT;未指定 LIMIT 时自动限制 50 行。

{% if db_name == 'l2' %} {% set samples = [ ('最近比赛', 'SELECT match_id, map_name, start_time, score_team1, score_team2 FROM fact_matches ORDER BY start_time DESC LIMIT 10'), ('队员比赛', 'SELECT steam_id_64, match_id, rating, kills, deaths, adr FROM fact_match_players ORDER BY match_id DESC LIMIT 20') ] %} {% elif db_name == 'l3' %} {% set samples = [ ('Roster Features', 'SELECT steam_id_64, total_matches, score_overall, tier_percentile FROM dm_player_features WHERE score_overall > 0 ORDER BY score_overall DESC'), ('周期荣誉', 'SELECT award_type, period_key, steam_id_64, matches, avg_rating FROM dm_player_awards ORDER BY period_start DESC LIMIT 20') ] %} {% else %} {% set samples = [ ('最近作业', 'SELECT id, job_type, status, current_stage, duration_seconds, created_at FROM etl_jobs ORDER BY id DESC LIMIT 10'), ('Roster Versions', 'SELECT id, name, effective_from, effective_to, is_current FROM team_roster_versions ORDER BY effective_from DESC') ] %} {% endif %} {% for label, sample in samples %} {% endfor %}
Read-only guard enabled
{% if error %}
{{ error }}
{% endif %} {% if result %}

查询结果

{{ row_count }} rows {{ '%.2fms'|format(duration_ms or 0) }}
{% for col in result.columns %}{% endfor %} {% for row in result.rows %} {% for col in result.columns %} {% endfor %} {% endfor %}
{{ col }}
{{ row[col]|string|truncate(160) }}
{% endif %}
{% endblock %} {% block scripts %} {{ super() }} {% endblock %}