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"
|
" WHERE user_ratings.user_id = users.id AND user_ratings.rating_type = 0"
|
||||||
" ORDER BY league_id DESC"
|
" ORDER BY league_id DESC"
|
||||||
" LIMIT 1"
|
" LIMIT 1"
|
||||||
" ) ON TRUE "
|
" ) AS nv_rating_table ON TRUE "
|
||||||
" LEFT JOIN LATERAL ("
|
" LEFT JOIN LATERAL ("
|
||||||
" SELECT value_after AS cs_rating"
|
" SELECT value_after AS cs_rating"
|
||||||
" FROM user_ratings"
|
" FROM user_ratings"
|
||||||
" WHERE user_ratings.user_id = users.id AND user_ratings.rating_type = 1"
|
" WHERE user_ratings.user_id = users.id AND user_ratings.rating_type = 1"
|
||||||
" ORDER BY league_id DESC"
|
" ORDER BY league_id DESC"
|
||||||
" LIMIT 1"
|
" LIMIT 1"
|
||||||
" ) ON TRUE "
|
" ) AS cs_rating_table ON TRUE "
|
||||||
")"
|
")"
|
||||||
"SELECT"
|
"SELECT"
|
||||||
" player_name AS name,"
|
" player_name AS name,"
|
||||||
|
|
Loading…
Reference in a new issue