change delivery count query to show next 7 days instead of current month
This commit is contained in:
@@ -151,7 +151,9 @@ func (q *Queries) GetDeliveryByID(ctx context.Context, id pgtype.UUID) (Delivery
|
||||
}
|
||||
|
||||
const getDeliveryCount = `-- name: GetDeliveryCount :many
|
||||
SELECT COUNT(*) as count, date FROM deliveries WHERE date >= DATE_TRUNC('month', CURRENT_DATE) GROUP BY date
|
||||
SELECT COUNT(*) as count, date FROM deliveries
|
||||
WHERE date >= CURRENT_DATE AND date < CURRENT_DATE + INTERVAL '7 days'
|
||||
GROUP BY date
|
||||
`
|
||||
|
||||
type GetDeliveryCountRow struct {
|
||||
|
||||
Reference in New Issue
Block a user