Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Take Free Test
Introduction to SQL Questions
SQL pattern matching: Choose the accurate statement. “In SQL-92, the wildcard asterisk (*) represents any sequence of characters.”
Indexing fundamentals: Assess this claim. “Indexes can usually be created for both primary keys and secondary (non-primary) keys.”
Aggregate results: Clarify the definition. “Scalar aggregates are multiple values returned from an SQL query that includes an aggregate function.”
SQL command categories: Decide whether the statement is accurate. “Data Manipulation Language (DML) commands are used to define a database, including creating, altering, and dropping tables and establishing constraints.”
Using DISTINCT and ALL: Assess the limitation. “DISTINCT and its counterpart ALL can be used more than once in a single SELECT statement.”
Purpose of SELECT DISTINCT: Choose the correct interpretation. “SELECT DISTINCT is used when a user wishes to see duplicate rows in a query result.”
COUNT with a non-grouped column: Analyze the statement. “The SQL: SELECT Name, COUNT() FROM NAME_TABLE; counts the number of name rows and displays this total in a table with a single row and a single column.”
Removing duplicate rows: Evaluate the necessity. “The qualifier DISTINCT must be used in an SQL statement when we want to eliminate duplicate rows.”
Subqueries vs. joins: Judge the generality of this claim. “There is an equivalent join expression that can be substituted for all subquery expressions.”
In SQL database practice, is there a standard ADD command used to insert one row or to add multiple rows from a query result, or is row insertion performed by another statement (such as INSERT and INSERT ... SELECT)?
Result sets in SQL: is the output of every SELECT query a tabular relation (a table-like result set) that can be further queried?
Sorting query results: can SQL ORDER BY sort by multiple columns (primary key, tie-breakers), or is it limited to only one column?
Understanding GROUP BY: does the SQL GROUP BY clause group together rows that share the same value(s) for the specified column(s) so that aggregations apply per group?
Can ORDER BY be used together with SELECT to control the presentation order of the rows returned by a query?
Indexes and storage/maintenance: does each index consume extra disk space and incur overhead during INSERT/UPDATE/DELETE operations when the indexed value changes?
Specifying ranges in SQL predicates: can you establish a range using comparison operators like < and > (and <=, >=), or must a special operator be used?
Column aliases and readability: does SQL provide the AS keyword to assign meaningful output names to expressions and built-in function results in a SELECT list?
WHERE clause expressiveness: can a WHERE condition reference multiple values/columns and combine predicates (using AND/OR/IN), or is it restricted to a single value?
Complex boolean logic: when combining three or more AND/OR conditions in SQL, is it usually easier to switch to NOT and NOT IN instead of using parentheses and explicit logic?
In SQL, can the BETWEEN keyword be used in a WHERE clause to select rows whose column values fall within an inclusive range (lower and upper bounds included)?
1
2
3
4