SQL and Database Fundamentals Flashcards
6 cards from real Data and Analytics practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 SQL and Database Fundamentals flashcards as text
Which aggregate function returns the total number of rows in a result set?
Answer: COUNT()
COUNT() returns the number of rows that match the specified condition, or total rows when used with *.
What is a foreign key in a relational database?
Answer: A column that references the primary key of another table
A foreign key establishes a referential link between a column in one table and the primary key of another table.
What SQL statement is used to retrieve data from a database?
Answer: SELECT
SELECT is the SQL DML statement used to query and retrieve data from one or more database tables.
Which SQL window function assigns a unique rank to each row within a partition?
Answer: ROW_NUMBER()
ROW_NUMBER() assigns a unique sequential integer to each row within a partition, with no gaps or ties.
What does a NULL value represent in a database?
Answer: An unknown or missing value
NULL represents the absence of a value or an unknown value in a database field.
What is a view in SQL?
Answer: A virtual table defined by a stored query
A view is a virtual table whose contents are defined by a SELECT query stored in the database.