11. A system comprising: one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations comprising: receiving a first executable statement, the first executable statement referencing a second set of fields in a table in a relational database, the first executable statement having instructions to cause the database to perform operations on data in the table; generating a second executable statement based on the first set of fields and the first executable statement, comprising: determining a mapping between the first set of fields and the second set of fields, comprising: identifying a first data type of a first field in the first set of fields, identifying a second data type of a second field in the second set of fields, identifying a conversion command to convert from the first data type to the second data type, and adding the conversion command to the second executable statement, specifying a derived table using the corresponding values and the mapping, and generating instructions to cause the database to perform the operations on the derived table; and sending the second executable statement to the database.
11. A system comprising: one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations comprising: receiving a first executable statement, the first executable statement referencing a second set of fields in a table in a relational database, the first executable statement having instructions to cause the database to perform operations on data in the table; generating a second executable statement based on the first set of fields and the first executable statement, comprising: determining a mapping between the first set of fields and the second set of fields, comprising: identifying a first data type of a first field in the first set of fields, identifying a second data type of a second field in the second set of fields, identifying a conversion command to convert from the first data type to the second data type, and adding the conversion command to the second executable statement, specifying a derived table using the corresponding values and the mapping, and generating instructions to cause the database to perform the operations on the derived table; and sending the second executable statement to the database. 15. The system of claim 11 , wherein generating a second executable statement based on the first set of fields and the first executable statement further comprises: providing an alias for the derived table; and updating the second executable statement to reference the alias.