Here is a very basic question I just came across the other day. I was interviewing nearly 20 candidates and I found that only 5 of them could write the query (with the help of the internet).
Question: How to determine the version and properties of SQL Server with the help of T-SQL?
Answer: Here is the simple script which can list version of SQL Server:
SELECT SERVERPROPERTY('productversion') ProductVersion,
SERVERPROPERTY ('productlevel') ProductLevel,
SERVERPROPERTY ('edition') Edition
Reference: Pinal Dave (https://blog.sqlauthority.com)