Skip to content

Commit

Permalink
Update export scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
lpil committed May 26, 2024
1 parent e8cdf97 commit 9f74728
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/export-accessibility-requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ with money as (
select
users.name as name,
users.email as email,
money.amount / 100 as paid,
money.amount is not null and money.amount > 0 as "has paid",
applications.answers ->> 'accessibility-requirements' as access
from users
left join
Expand Down
7 changes: 4 additions & 3 deletions bin/export-dietary-requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ with money as (
select
users.name as name,
money.amount / 100 as paid,
money.amount is not null and money.amount > 0 as "has paid",
applications.answers ->> 'dietary-requirements' as diet
from users
left join
join
applications on applications.user_id = users.id
left join
join
money on money.reference = applications.payment_reference
where
diet is not null
Expand All @@ -39,6 +39,7 @@ where
and diet != 'None'
and diet != 'None, thank you x'
and diet != 'Nope'
and diet != 'Nope!'
and diet != 'none';
.quit
Expand Down

0 comments on commit 9f74728

Please sign in to comment.