Hi Rubens,
There should be a couple of ways of making it work...
1. This uses eval to give you the time difference in milliseconds
SELECT eval('deleted_at - created_at') AS diff FROM Friends
2. This uses eval to give you the time difference in seconds
SELECT eval('(deleted_at - created_at) / 1000') AS diff FROM Friends
3. Create a function and use that to give you the difference in milliseconds
INSERT INTO OFunction SET name='diff', parameters=["datetime1", "datetime2"], language='groovy', code="return datetime1.getTime() - datetime2.getTime();"
SELECT diff(deleted_at, created_at) AS diff from Friends