Skip to content
Snippets Groups Projects
Commit a5d9c6b8 authored by Martin Mareš's avatar Martin Mareš
Browse files

Skript pro výběr adres k rozeslání reklamy na MO-P

parent 85c77cf2
Branches
No related tags found
No related merge requests found
#!/bin/bash
# Najde adresy účastníků kategorií A-C, kterým chceme poslat spam o MO-P
YEAR=73
psql mo_osmo -q --csv -c "
select email from users
where user_id in (
select user_id from participants
where year=$YEAR
and grade not in ('8/8', '4/4')
) and user_id in (
select user_id from participations
where contest_id in (
select contest_id from contests
where round_id in (
select round_id from rounds
where year=$YEAR
and category in ('A', 'B', 'C')
and seq=1
)
)
) and email not like '%@nomail'
and email not like '%@test'
order by email;
"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment