mirror of
https://github.com/norohind/jubilant-system.git
synced 2025-04-20 16:07:36 +03:00
Fix squads_view don't showing proper inserted_timestamp
This commit is contained in:
parent
0beb0216c3
commit
013c39426b
@ -39,13 +39,42 @@ inserted_timestamp datetime default current_timestamp);
|
||||
|
||||
create view if not exists squads_view
|
||||
as
|
||||
select *
|
||||
from squads_states
|
||||
where inserted_timestamp in (
|
||||
select max(inserted_timestamp)
|
||||
from squads_states
|
||||
group by squad_id) and tag is not null
|
||||
group by squad_id;
|
||||
select squad_id,
|
||||
name,
|
||||
tag,
|
||||
owner_name,
|
||||
owner_id,
|
||||
platform,
|
||||
created,
|
||||
created_ts,
|
||||
accepting_new_members,
|
||||
power_id,
|
||||
power_name,
|
||||
super_power_id,
|
||||
super_power_name,
|
||||
faction_id,
|
||||
faction_name,
|
||||
user_tags,
|
||||
member_count,
|
||||
pending_count,
|
||||
full,
|
||||
public_comms,
|
||||
public_comms_override,
|
||||
public_comms_available,
|
||||
current_season_trade_score,
|
||||
previous_season_trade_score,
|
||||
current_season_combat_score,
|
||||
previous_season_combat_score,
|
||||
current_season_exploration_score,
|
||||
previous_season_exploration_score,
|
||||
current_season_cqc_score,
|
||||
previous_season_cqc_score,
|
||||
current_season_bgs_score,
|
||||
previous_season_bgs_score,
|
||||
current_season_powerplay_score,
|
||||
previous_season_powerplay_score,
|
||||
current_season_aegis_score,
|
||||
previous_season_aegis_score, max(inserted_timestamp) as inserted_timestamp from squads_states group by squad_id having tag is not null;
|
||||
|
||||
create table if not exists news (
|
||||
squad_id int,
|
||||
|
Loading…
x
Reference in New Issue
Block a user