Skip to content

Instantly share code, notes, and snippets.

@fuzzysteve
Created March 21, 2014 20:33
Show Gist options
  • Save fuzzysteve/9695750 to your computer and use it in GitHub Desktop.
Save fuzzysteve/9695750 to your computer and use it in GitHub Desktop.
Refinery levels by security status.
+------------------------+----------+----------+
| reprocessingEfficiency | count(*) | Security |
+------------------------+----------+----------+
| 0.5 | 2708 | high |
| 0.4 | 1 | high |
| 0.35 | 26 | high |
| 0.32 | 95 | high |
| 0.3 | 155 | high |
| 0.25 | 10 | high |
| 0.5 | 1476 | low |
| 0.4 | 5 | low |
| 0.35 | 3 | low |
| 0.32 | 61 | low |
| 0.3 | 95 | low |
| 0.25 | 8 | low |
| 0.5 | 480 | nullsec |
| 0.4 | 6 | nullsec |
| 0.35 | 26 | nullsec |
| 0.32 | 12 | nullsec |
| 0.3 | 13 | nullsec |
| 0.25 | 1 | nullsec |
+------------------------+----------+----------+
select reprocessingEfficiency,count(*),
case
when (mapSolarSystems.security>0.5) then 'high'
when mapSolarSystems.security<0.5 and mapSolarSystems.security>0 then 'low'
when mapSolarSystems.security<0 and mapSolarSystems.security!=-0.99 then 'nullsec'
end Security
from staStations
join mapSolarSystems on staStations.solarSystemID=mapSolarSystems.solarSystemID
group by
case
when (mapSolarSystems.security>0.5) then 'high'
when (mapSolarSystems.security<0.5 and mapSolarSystems.security>0) then 'low'
when (mapSolarSystems.security<0 and mapSolarSystems.security!=-0.99) then 'null'
end,
reprocessingEfficiency
order by security,reprocessingEfficiency desc;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment