Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Friday, Dec 4.Claim the deal

(This question is a variation of the LeetCode question 2408. Design SQL. If you haven't completed that question yet, it is recommended to solve it first.)

Design an in-memory SQL database system that supports creating tables, inserting data with dynamic type inference, and performing queries with filtering and sorting capabilities.

Implement the SQLManager class:

  • SQLManager() Initializes the empty database system.

  • void createTable(String tableName, List<String> columnNames) Creates a new table with the given tableName and a list of fixed columnNames.

    • The tableName is guaranteed to be unique.
    • Columns are initially untyped, but data inserted will be inferred as either integers or strings.
Test Cases
Input
Output
Expected