postgres: add table alias to query
This commit is contained in:
parent
8e1b84467b
commit
c525f80fe9
1 changed files with 2 additions and 2 deletions
|
@ -460,14 +460,14 @@ def get_player_list() -> List[Dict]:
|
|||
" WHERE user_ratings.user_id = users.id AND user_ratings.rating_type = 0"
|
||||
" ORDER BY league_id DESC"
|
||||
" LIMIT 1"
|
||||
" ) ON TRUE "
|
||||
" ) AS nv_rating_table ON TRUE "
|
||||
" LEFT JOIN LATERAL ("
|
||||
" SELECT value_after AS cs_rating"
|
||||
" FROM user_ratings"
|
||||
" WHERE user_ratings.user_id = users.id AND user_ratings.rating_type = 1"
|
||||
" ORDER BY league_id DESC"
|
||||
" LIMIT 1"
|
||||
" ) ON TRUE "
|
||||
" ) AS cs_rating_table ON TRUE "
|
||||
")"
|
||||
"SELECT"
|
||||
" player_name AS name,"
|
||||
|
|
Loading…
Reference in a new issue