Postgres 9.4以上随意版本,可以简写. ... pgsql count 条件查询 ... SELECT u.name , count(*) FILTER (WHERE g.winner_id > 0) AS played ...
確定! 回上一頁