LTM Limited Interview Question

I was asked 2 basic coding questions on logic building and arrays, and 1 SQL query on filtering data using WHERE clause and sorting using ORDER BY in a table.