Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql> select md.typeid,typename,count(md.typeid) from mapSolarSystems mss join mapRegions mr on (mss.regionid=mr.regionid) join mapConstellations mc on (mc.constellationid=mss.constellationid) join mapDenormalize md on mss.solarsystemid=md.solarsystemid join invTypes it on (it.typeid=md.typeid) where mss.security>=0.5 and coalesce(mss.factionid,mc.factionid,mr.factionid)=500004 and it.groupid=7 group by typeid;
- +--------+--------------------+------------------+
- | typeid | typename | count(md.typeid) |
- +--------+--------------------+------------------+
- | 11 | Planet (Temperate) | 231 |
- | 12 | Planet (Ice) | 95 |
- | 13 | Planet (Gas) | 573 |
- | 2014 | Planet (Oceanic) | 78 |
- | 2015 | Planet (Lava) | 162 |
- | 2016 | Planet (Barren) | 573 |
- | 2017 | Planet (Storm) | 121 |
- | 2063 | Planet (Plasma) | 42 |
- +--------+--------------------+------------------+
- 8 rows in set (0.02 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement