diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-11-05 21:54:37 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-11-05 21:54:37 +0100 |
commit | 3682e456846d14f827a2f736e08b93aba0076540 (patch) | |
tree | ff598ed6abc3a5e0e24c184fedd2c950d94247c6 /schema.sql | |
parent | 7986145f941bfb5a898c91eb175e3a740d663ea0 (diff) | |
download | server-3682e456846d14f827a2f736e08b93aba0076540.tar.gz |
Improve tournament sorting order.
Diffstat (limited to 'schema.sql')
-rw-r--r-- | schema.sql | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -636,9 +636,12 @@ drop view if exists tm_pool_active_view; create view tm_pool_active_view as select tm_pools.*, + tm_seeds.title_id, + tm_seeds.seed_name, sum(status > 1) || ' / ' || count(1) as status from tm_pools + join tm_seeds using(seed_id) left join tm_rounds using(pool_id) left join games using(game_id) where @@ -646,16 +649,19 @@ create view tm_pool_active_view as group by pool_id order by - pool_name + seed_name, level, pool_id ; drop view if exists tm_pool_finished_view; create view tm_pool_finished_view as select tm_pools.*, + tm_seeds.title_id, + tm_seeds.seed_name, group_concat(name) as status from tm_pools + join tm_seeds using(seed_id) left join tm_winners using(pool_id) left join users using(user_id) where @@ -663,7 +669,7 @@ create view tm_pool_finished_view as group by pool_id order by - pool_name + seed_name, level, pool_id ; drop view if exists tm_pool_view; |