...
Code Block |
---|
date now = currentDate(); // just to make sure we use the same reference date string [] subtasks = subtasks(key); interval age; for(string task in subtasks){ age = age + (now - %task%.created); } return "Average age of subtasks is " + (age / size(subtasks)); |
Results from Database
Code Block |
---|
//select the city from the specified region
return sql("TestSQL", "select Localitate from Localitati l, Judete j, Regiuni r where l.idjudet=j.id and j.idregiune=r.id and r.regiune='BUCURESTI'"); |