Wednesday, February 08, 2012
   
Text Size

Visual Studio and EVE Sample SQL Queries

( 1 Vote )

Visual Stduo and EVE ApplicationsThe following queries can be plugged into your SQL Management Package to test your database.

Try playing with and getting familiar with the SQL Server Management Package using these and othe queries available from the WIKI site at http://wiki.eve-id.net/Category:SQL_Queries

Please note that not all the queries listed on the WIKI site actually work properly but most do and those listed below work normally.

Find station with 'Cloning' service in Verge Vendor region starting with 'Ae'

SELECT nA.itemName AS Agent, nS.itemName AS Station FROM agtConfig c
INNER JOIN agtAgents a ON c.agentID=a.agentID
INNER JOIN eveNames nA ON c.agentID=nA.itemID
LEFT JOIN eveNames nS ON a.locationID=nS.itemID
WHERE c.k='agent.LocateCharacterService.enabled'
AND nA.itemName LIKE 'Ae%';

Produces this:
AgentStation
Aessen Ancille Ondree VIII - Bank of Luminaire Investment Bank
Aedalard Armin Aulbres VII - Moon 16 - CONCORD Assembly Plant
Aelar Angils Kehrara IV - Nefantar Miner Association Refinery
Aellike Erobsdin Murema IV - Republic Security Services Assembly Plant
Aelrersand Huger Itamo VI - Core Complexion Inc. Storage
Aelfur Andirid Ranni VIII - Moon 2 - Core Complexion Inc. Storage
Aevombell Ebunden Odebeinn III - Moon 13 - Freedom Extension Storage
Aeswa Erdokar Klogori V - Moon 2 - Freedom Extension Storage
Aedar Kollorage Altbrard IX - Moon 8 - CONCORD Testing Facilities
Aengako Tatanur Jarizza VI - Moon 1 - Ammatar Consulate Bureau


Researching and Copying for the Prototype Cloaking Device I Blueprint (typeID 13000):


SELECT a.activityName, t.typeName, r.quantity, r.damagePerJob
FROM ramTypeRequirements AS r
INNER JOIN invTypes AS t
ON r.requiredTypeID = t.typeID
INNER JOIN ramActivities AS a
ON r.activityID = a.activityID
WHERE r.activityID IN (3, 4, 5) -- time, material research, copying
AND r.typeID = 13000 -- Prototype Cloaking Device I Blueprint
ORDER BY a.activityName, t.typeName;

Produces this:

activityNametypeNamequantitydamagePerJob
Copying Data Sheets 20 1
Copying Graviton Physics 3 0
Copying Hydromagnetic Physics 1 0
Copying Quantum Physics 3 0
Copying R.Db - CreoDron 1 0.5
Copying R.Db - Ishukone 1 0.5
Researching Material Productivity Consumer Electronics 1 1
Researching Material Productivity Graviton Physics 2 0
Researching Material Productivity Metallurgy 5 0
Researching Material Productivity Quantum Physics 2 0
Researching Material Productivity R.Db - CreoDron 1 0.3
Researching Material Productivity R.Db - Ishukone 1 0.3
Researching Material Productivity Reports 5 1
Researching Time Productivity Consumer Electronics 4 1
Researching Time Productivity Graviton Physics 2 0
Researching Time Productivity Quantum Physics 2 0
Researching Time Productivity R.Db - CreoDron 1 0.4
Researching Time Productivity R.Db - Ishukone 1 0.4
Researching Time Productivity Reports 5 1


Returns list of POS modules with CPU and Powergrid requirements.

note: in example part of output table is filtered with ... and
t.typeName like '%Array' ...


SELECT t.typeName, -- name of item
a30.valueInt AS PG, -- power grid
a50.valueInt AS CPU -- CPU
FROM invTypes t
LEFT JOIN dgmTypeAttributes a30 ON t.typeID=a30.typeID
LEFT JOIN dgmTypeAttributes a50 ON t.typeID=a50.typeID
INNER JOIN invGroups g ON t.groupID=g.groupID
WHERE g.categoryID=23 -- POS group is 23, see invGroups table
AND a30.attributeID=30 -- power grid attribute is 30, see dgmAttributeTypes
AND a50.attributeID=50 -- cpu attribute is 50
AND t.published=1 -- filtering not in-game items
AND t.typeName LIKE "%Array";


Produces this:

typeNamePGCPU
Refining Array 100000 700
Medium Intensive Refining Array 375000 2000
Intensive Refining Array 750000 4000
Ship Maintenance Array 250000 0
Capital Ship Maintenance Array 1000000 0
Equipment Assembly Array 90000 150
Rapid Equipment Assembly Array 110000 200
Small Ship Assembly Array 100000 250
Capital Ship Assembly Array 1000000 2000
Advanced Small Ship Assembly Array 100000 250
Medium Ship Assembly Array 200000 500
Advanced Medium Ship Assembly Array 200000 500
X-Large Ship Assembly Array 300000 1000
Advanced Large Ship Assembly Array 300000 1000
Ammunition Assembly Array 50000 150
Drone Assembly Array 50000 150
Component Assembly Array 50000 150
Large Ship Assembly Array
Subsystem Assembly Array
Coupling Array 10000 155
Moon Harvesting Array 10000 500
Complex Reactor Array 250000 3000
Simple Reactor Array 125000 1500
Medium Biochemical Reactor Array 250000 750
Biochemical Reactor Array 250000 1250
Polymer Reactor Array
Ballistic Deflection Array 150000 250
Explosion Dampening Array 150000 250
Heat Dissipation Array 150000 250
Photon Scattering Array 150000 250
Corporate Hangar Array 100000 150
Tracking Array 25000 150
System Scanning Array 25000 25
Cynosural Generator Array 375000 150



Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

Classified Search


Classified Top Five

Visitor Stats

JoomlaWatch Stats 1.2.9 by Matej Koval

Visitor Locations



Countries

35.8%United States United States
20%United Kingdom United Kingdom
7.1%Germany Germany
3.1%Netherlands Netherlands
2.9%India India
2.9%Australia Australia
2.7%Canada Canada
2.7%France France
1.4%Sweden Sweden
1.2%Japan Japan

Visitors

Today: 15
Yesterday: 28
This Week: 50
Last Week: 321
This Month: 287
Last Month: 1432
Total: 13059