Fixing query interface.
Adding insert to query.