import { DataSource } from 'typeorm';

export async function handler(dataSource: DataSource) {
  return dataSource.query(`
    select year(now())-year(u.birthday) as age
      from user u
    left join role r 
      on u.role_id = r.id
    where u.del_flag = 0 and r.base = 3
  `);
}
