// guess the programming language of the day

$ whois t-sql

T-SQL

first released in 1987 · by Sybase, Microsoft

$ guessprog --inspect t-sql

year
1987
paradigm
procedural
family
other
memory
automatic gc
binding
static
safety
weak

T-SQL(7)

AUTHORS
Sybase, Microsoft
HISTORY
Transact-SQL was created by Sybase for its SQL Server database, released in 1987, adding variables, control flow, error handling and stored procedures to SQL. Microsoft partnered with Sybase to bring SQL Server to OS/2 and later Windows NT, and after the two companies went separate ways in the 1990s each kept developing its own dialect. It freely converts values between types, following a fixed type precedence.
USAGE
The language of Microsoft SQL Server and Azure SQL, extremely common in enterprise applications, reporting and data warehousing. Sybase's dialect lives on in SAP ASE.
SEE ALSO
T-SQL on Wikipedia ↗
$ cat squares.sql
DECLARE @total INT = 0, @i INT = 1;

WHILE @i <= 10
BEGIN
    SET @total += @i * @i;
    SET @i += 1;
END;

SELECT 'Sum of squares: ' + CAST(@total AS VARCHAR(10)) AS result;

-- implicit conversion: the string becomes an integer
SELECT '1' + 1 AS two;