Problem with SELECT

Asked

Viewed 37 times

1

I have the following SELECT

SELECT t.nome, count(t.id)
FROM Partidas p
LEFT JOIN Times t ON p.codTimeCasa = t.id
OR p.codTimeVisitante = t.id
GROUP BY t.nome

I would like him to return the teams that have no link with the table partidas, however it only returns those who have, someone would know the solution of this problem?

1 answer

1

  • Thank you very much for the answer, but what I need is the teams that have matches and the teams that do not, this your select returned the following error :ERROR: Missing FROM-clause entry for table "t" LINE 1: SELECT Count(t. id).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.