This session explores two powerful custom-built features achieved using SQL in 4D: Advanced Search and User-Defined Structure. The Advanced Search feature demonstrates building queries based completely on user input. Challenges tackled include managing nulls, dates, times, etc., via SQL. In addition, benchmarks comparing queries using SQL and DB4D on different size data sets, data types, and indexed versus non-indexed fields are presented. The User-Defined Structure feature uses the SQL DDL to allow users to manipulate the database structure in real-time, on the fly, as they see fit. Of course with this kind of power comes greater responsibility for the developer in order to properly maintain the application going forward. These challenges are discussed as well. This session functions as an introduction to using SQL in 4D to solve problems that might not otherwise be feasible using DB4D commands.