A table has some NULL entries in the column. Which of the following queries correctly counts the number of students who have a recorded (non-NULL) mark in any subject?
GATE CSE · Dbms
Master topic for SQL. Includes SQL - Aggregate Functions & NULLs, SQL - Nested Subqueries.
85 questions · 0 PYQs · 20 AI practice · GATE CSE 2027
A table has some NULL entries in the column. Which of the following queries correctly counts the number of students who have a recorded (non-NULL) mark in any subject?
Consider a table with the following tuples: , , , . What is the result of the query: ?
What is the result of the following SQL query if the table contains only one tuple with ?
Which of the following SQL functions ignores NULL values?
Consider the relation . The query: What does the clause do here, and how does it differ from ?
Consider the SQL query: Which of the following statements is TRUE if has a tuple where ?
Consider the following query on : Which of the following is TRUE about how NULL salaries affect the result?
A table has the following tuples: , , , . Consider the query: Which of the following is TRUE about and ?
Consider a relation and the following SQL query: Which groups are included in the result?
Consider a table with 10 rows where 3 rows have and the remaining 7 have distinct non-NULL values of . What are the values of and ?
Given a relation where can be NULL, which query correctly finds customers who have placed orders with an average amount greater than 500?
Consider a relation and the following two queries: Which of the following is TRUE?
Consider the relation with the following tuples: , , , , . The query: What is the output for ?
Consider a relation where can be NULL. Which of the following statements about the query below are TRUE?
The following query is run on a table where can be NULL. If the grades are: , what is the result?
Which of the following SQL expressions correctly computes the number of departments that have at least one employee with a non-NULL salary greater than 50000, given the table ?
Which of the following is/are TRUE about SQL aggregate functions and NULL? \begin{itemize} \item[(P)] of a column of all NULLs returns NULL \item[(Q)] never returns NULL \item[(R)] ignores NULLs in both the sum and the count (denominator) \item[(S)] and return NULL if all values are NULL \end{itemize}
The SQL operator used to check existence of tuples in a subquery is ______.
The following SQL query is executed on a table containing tuples: , , , , , . What is the output for and ?
Consider the following SQL query on relation : If a department has only one employee with a non-NULL salary, the result for that department is:
Want unlimited AI-generated Sql questions?
Sign up free and practice with adaptive difficulty — Easy, Medium, Hard. New questions every session.
Start practising for free →