-
-
Save a1994sc/09ee967197b213fcb88b6929be9ab5ee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select trim(SUBSTR(reward, 1, LENGTH(reward) - 6)) as Name, | |
count(reward) as Occurance | |
from Alerts as A | |
where | |
( | |
Name in ( | |
select N.Name as Name | |
from Nightmare as N | |
) or Name in ( | |
select Au.Name | |
from Aura as Au | |
) | |
) | |
and A.read_time like "%Jul%16" | |
group by Reward | |
union | |
select Nm.Name as Name, | |
0 as Occurance | |
from Nightmare as Nm | |
where Name not in ( | |
select trim(SUBSTR(A.reward, 1, LENGTH(A.reward) - 6)) as Name | |
from Alerts as A | |
where A.read_time like "%Jul%16" | |
and reward like "%(Mod)" | |
) | |
union | |
select Au.Name as Name, | |
0 as Occurance | |
from Aura as Au | |
where Name not in ( | |
select trim(SUBSTR(A.reward, 1, LENGTH(A.reward) - 6)) as Name | |
from Alerts as A | |
where A.read_time like "%Jul%16" | |
and reward like "%Aura)" | |
) | |
order by Occurance desc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment