QuestenaPráctica que te muestra qué repasar después
Pregunta 21

In PostgreSQL 18, a column x holds the values NULL, NULL, 1, 1 and 2. How many rows does SELECT x, count(*) FROM ... GROUP BY x; return?

  1. 3Respuesta correcta
  2. 2
  3. 5
  4. 4

Explicación

All rows whose grouping column is null land in a single group, so the groups are NULL, 1 and 2, and the null group reports a count of 2. Answering 4 applies the rule that NULL = NULL is not true to grouping, but grouping does not use the = operator.

Continúa con este test

Empezar la práctica
Pregunta 21: In PostgreSQL 18, a column x holds the values NULL, NULL,… · SQL: NULL, Joins and Aggregates · Questena