Alex Kotov, не сможете, к сожалению. Вот примерный (из предыдущей версии системы) sql-запрос, который формирует результаты:
select
teams.id as tid,
teams.cat_id as cid,
concat(categories.start_number_prefix, teams.snumber) as fsnumber,
teams.name,
(select passtime from **_monitor where team_id=tid and cp_id =(select cp_id from **_routes where comp_id="'.***.'" and cat_id=cid and cp_type="start")) as start_time,
(select passtime from **_monitor where team_id=tid and cp_id =(select cp_id from **_routes where comp_id="'.***.'" and cat_id=cid and cp_type="finish")) as finish_time,
((select passtime from **_monitor where team_id=tid and cp_id =(select cp_id from **_routes where comp_id="'.***.'" and cat_id=cid and cp_type="finish"))-(select passtime from **_monitor where team_id=tid and cp_id =(select cp_id from **_routes where comp_id="'.***.'" and cat_id=cid and cp_type="start"))) as track_time,
(select sum(bonustime) from **_routes where comp_id=teams.comp_id and cat_id=cid and cp_id in (select cp_id from **_monitor where is_correct=1 and team_id=tid)) as bonus_points,
IF
(
(SELECT passtime FROM **_monitor WHERE team_id = tid
AND cp_id = (SELECT cp_id FROM **_routes WHERE comp_id = "'.***.'" AND cat_id = cid AND cp_type = "finish")
)
<
(
(SELECT passtime FROM **_monitor WHERE team_id = tid
AND cp_id = (SELECT cp_id FROM **_routes WHERE comp_id = "'.***.'" AND cat_id = cid AND cp_type = "start")
)
+
(SELECT rg_control_time FROM reg_category_settings WHERE comp_id = "'.***.'" AND cat_id = cid)*60
)
, 0
,
(
(
SELECT
passtime
FROM
**_monitor
WHERE
team_id = tid
AND cp_id = (SELECT cp_id FROM **_routes WHERE comp_id = "'.***.'" AND cat_id = cid AND cp_type = "finish")
)
-
(
(
SELECT
passtime
FROM
**_monitor
WHERE
team_id = tid
AND cp_id = (SELECT cp_id FROM **_routes WHERE comp_id = "'.***.'" AND cat_id = cid AND cp_type = "start")
)
+
(
SELECT
rg_control_time
FROM
reg_category_settings
WHERE
comp_id = teams.comp_id
AND cat_id = cid
)*60
)
) DIV 60
) AS penalty_points,
((select sum(bonustime) from **_routes where comp_id=teams.comp_id and cat_id=cid and cp_id in (select cp_id from **_monitor where is_correct=1 and team_id=tid))) - (IF
(
(
SELECT
passtime
FROM
**_monitor
WHERE
team_id = tid
AND cp_id = (SELECT cp_id FROM **_routes WHERE comp_id = "'.***.'" AND cat_id = cid AND cp_type = "finish")
)
<
(
(
SELECT
passtime
FROM
**_monitor
WHERE
team_id = tid
AND cp_id = (SELECT cp_id FROM **_routes WHERE comp_id = "'.***.'" AND cat_id = cid AND cp_type = "start")
)
+
(
SELECT
rg_control_time
FROM
reg_category_settings
WHERE
comp_id = "'.***.'"
AND cat_id = cid
)*60
)
, 0
,
(
(
SELECT
passtime
FROM
**_monitor
WHERE
team_id = tid
AND cp_id = (SELECT cp_id FROM **_routes WHERE comp_id = "'.***.'" AND cat_id = cid AND cp_type = "finish")
)
-
(
(
SELECT
passtime
FROM
**_monitor
WHERE
team_id = tid
AND cp_id = (SELECT cp_id FROM **_routes WHERE comp_id = "'.***.'" AND cat_id = cid AND cp_type = "start")
)
+
(
SELECT
rg_control_time
FROM
reg_category_settings
WHERE
comp_id = "'.***.'"
AND cat_id = cid
)*60
)
) DIV 60
)) as total_points,
teams.status
from teams, categories, reg_category_settings
where
teams.status in (3,4,6,9,10,99)
and reg_category_settings.cat_id=teams.cat_id
and reg_category_settings.comp_id=teams.comp_id
and teams.cat_id=categories.id
and teams.comp_id="'.***.'"
and teams.cat_id="'.$cat_id.'"
order by
categories.start_number_prefix,
teams.status,
total_points desc,
track_time,
cast(teams.snumber as unsigned)
Подождите маленько, скоро всё будет.