I am using a bit of SQL from this thread: Calculate Age From Birthday to calculate the age in a query. It is working perfectly to calculate the age but I am having trouble adding additional columns to that query. I would like to at least add the “ID” column from the same table.
SELECT (1.0 * MYDATE / 365) AS AGE FROM (SELECT DATEDIFF( 'day', "BIRTHDATE", CURRENT_TIMESTAMP ) "MYDATE" FROM "BIRTHDATES")
In my basic knowledge of SQL I usually simply add a comma and the name of the next column that I would like to see in the query, but with this more complicated bit of code that includes parentheses, I haven’t been able to figure out the correct syntax.
Thank you!