請問在TypeORM的.createQueryBuilder查詢時,要怎麼依YYYY-MM-DD 格式作groupBy?
目前Try的方式用Day()的方式只能讀取到day的數值,無法完整取得YYYY-MM-DD
const c = await this.clickLogRepository.createQueryBuilder('click')
.select(['Month(click.createDate) AS Month', 'Day(click.createDate) AS Day', 'COUNT(click.logType) AS count'])
.groupBy('Day(click.createDate)')
.addGroupBy('Day(click.createDate)')
.getRawMany();
return c;