SQL Practice Questions: Test Your Knowledge! What is the purpose of the SQL DROP TABLE statement?To delete an existing tableTo add new rows to an existing tableTo modify the structure of an existing tableTo create a new tableWhat is the purpose of the SQL ORDER BY clause?To sort the rows in a result set in ascending or descending orderTo filter the rows in a result set based on a conditionTo group the rows in a result setTo perform aggregate functions on a result setWhat is the purpose of the INNER JOIN in SQL?To return all rows from both tables, regardless of matching conditionsTo return only the rows that have matching values in both tablesTo return all rows from the left table and matching rows from the right tableTo return all rows from the right table and matching rows from the left tableWhich SQL function returns the current user of the database?CURRENTUSER()USER()SYSUSER()LOGGEDIN()Which SQL function is used to calculate the average value of a column?AVGAVERAGEMEANMEDIANWhat is the purpose of the SQL ORDER BY clause?To order the results of a queryTo filter rows based on a conditionTo group rows that have the same values into summary rowsTo limit the number of rows returned by a queryWhat is the purpose of the SQL HAVING clause?To filter the rows in a result set based on a conditionTo group the rows in a result setTo sort the rows in a result setTo perform aggregate functions on a result setWhich SQL function returns the name of the month from a date value?MONTH()MONTHNAME()GETMONTH()DATE_MONTH()Which SQL statement is used to create a view?MAKE VIEWGENERATE VIEWCREATE VIEWNEW VIEWWhat is the purpose of the SQL DATEPART function?To extract a specific date or time component from a datetime valueTo format a dateTo calculate the difference between two datesTo perform date arithmeticWhat is the purpose of the OFFSET FETCH clause in SQL?To filter rowsTo sort resultsTo skip a specified number of rowsTo limit the result setWhich SQL function is used to calculate the number of weekdays between two dates during the transformation phase?NETWORKDAYSWORKDAYSWEEKDAYSBUSINESSDAYSWhat is the purpose of the SQL DISTINCT keyword?To return unique values from a columnTo filter rows based on a conditionTo order the results of a queryTo limit the number of rows returned by a queryWhich SQL function converts a number to a string?TOSTRING()STR()CAST()CONVERT()Which SQL statement is used to grant permissions to a user?ALLOWPERMITGRANTAUTHORIZEWhich SQL aggregate function is used to find the highest value in a column?TOPPEAKMAXCEILINGWhich SQL keyword is used to perform a natural join between two tables?NATURAL JOINIMPLICIT JOINDIRECT JOININHERENT JOINWhat is the purpose of the SQL FULL OUTER JOIN clause?To return rows when there is a match in either the left or right tableTo return all rows from the left table, even if there are no matches in the right tableTo return all rows from the right table, even if there are no matches in the left tableTo return rows when there is a match in both tablesWhich SQL operator is used to compare a value against a pattern using wildcard characters?LIKEMATCHREGEXCONTAINSWhat is the purpose of the SQL DROP TABLE statement?To delete a table and its data from the databaseTo empty a table without deleting its structureTo rename a tableTo modify the structure of a table Score: 0/20 Next Set of Questions