Fixes 500 error on dashboard when using MSSQL (#2504)
Fixes 500 error on dashboard when using MSSQL (#2504)

MSSQL rejects the query:
  SELECT "repository"."id" FROM "repository"
  INNER JOIN "team_repo" ON "team_repo".repo_id="repository".id AND
  "repository".is_mirror=1
  WHERE (
    ("repository".owner_id=2 AND "repository".is_private=0)
        OR team_repo.team_id IN (1)
        )
        GROUP BY "repository".id ORDER BY updated_unix DESC

when the order by term (updated_unix) is not included in the group by
term.
vCaesar/gitea,tboerger/gitea,typeless/gitea,ethantkoenig/gogs,lafriks/gitea,tboerger/gitea,jorgesumle/gitea,cumgun/gitea,mjwwit/gitea,kubatyszko/gitea,vdbt/gitea,sapk-fork/gitea,lunny/gitea,typeless/gitea,rems4e/gitea,jorgesumle/gitea,andreynering/gitea,Bwko/gitea,ethantkoenig/gitea,go-gitea/gitea,tboerger/gitea,Bwko/gitea,CaeruleusAqua/gitea,vdbt/gitea,typeless/gitea,Bwko/gitea,kubatyszko/gitea,lunny/gitea,dnmgns/gitea,dl5rcw/gitea,vCaesar/gitea,Morlinest/gitea,rems4e/gitea,mjwwit/gitea,dnmgns/gitea,ethantkoenig/gitea,spacetourist/gitea,go-gitea/gitea,ethantkoenig/gogs,CaeruleusAqua/gitea,sapk-fork/gitea,lafriks/gitea,cez81/gitea,cez81/gitea,spacetourist/gitea,Morlinest/gitea,cez81/gitea,go-gitea/gitea,typeless/gitea,cumgun/gitea,lafriks/gitea,kjellkvinge/gitea,kjellkvinge/gitea,dnmgns/gitea,kubatyszko/gitea,geek1011/gitea,sapk-fork/gitea,kjellkvinge/gitea,geek1011/gitea,lunny/gitea,andreynering/gitea,sapk-fork/gitea