how to get last 7 days record in knex code example
Example: date range query knex
knex('table')
.where('createdAt', '>=', '2009-01-01T00:00:00Z')
.where('createdAt', '<', '2010-01-01T00:00:00Z')
knex('table')
.where('createdAt', '>=', '2009-01-01T00:00:00Z')
.where('createdAt', '<', '2010-01-01T00:00:00Z')