Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions sql/reports/sfdc/payments.sql
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ WHERE
FROM challenges."Challenge" c2
WHERE c2.name ILIKE '%' || $5 || '%'
))
AND ($6::timestamptz IS NULL OR p.created_at >= $6::timestamptz)
AND p.created_at >= COALESCE($6::timestamptz, (NOW() AT TIME ZONE 'UTC') - INTERVAL '45 days')
AND ($7::timestamptz IS NULL OR p.created_at <= $7::timestamptz)
AND ($8::numeric IS NULL OR p.total_amount >= $8::numeric)
AND ($9::numeric IS NULL OR p.total_amount <= $9::numeric)
AND ($10::text[] IS NULL OR c.status::text = ANY($10::text[]))
ORDER BY p.created_at DESC
LIMIT 1000;
Loading