Re: All U.S.M.C. Scenarios for 2019
You can run this in the version you already have simply cut and past it into the SQL window
it will show you every nation that Russia is the P2 opponent and add that to the 34 as P1
SELECT P1Name, P2Name, sYear, COUNT(sYear) AS Total
FROM ScenData.db
WHERE P2Name = "Russia"
GROUP BY sYear, P2Name, P1Name
That gives you the totals by year and by national opponent as P1
BUT with that version you MUST go to the SORT tab first and press Create Tables for it to find the info you are asking for with that SQL
That said pressing Create Tables the first time you use it and any time you make changes to Scenarios is best SOP
This one
SELECT P1Name, P2Name, COUNT(P2Name) AS Total
FROM ScenData.db
WHERE( LOWER(p2Name) like "%russia%")
GROUP BY P2Name, P1Name
Will total the number of scenarios Russia is the P2 opponent by nation but not by year. Also note the use of WHERE( LOWER(p2Name).....using LOWER allows you to enter the name in all lower case so it ignores capitols..useful if you are looking for all the SdKfz... it can be written sdkfz.
P1Name P2Name Total
Belgium Russia 1
Canada Russia 1
China Russia 4
Czechoslovakia Russia 1
Finland Russia 5
France Russia 2
GB Russia 4
Germany Russia 10
Greece Russia 1
Italy Russia 1
Japan Russia 1
Netherlands Russia 3
Norway Russia 5
Poland Russia 3
Romania Russia 2
Sweden Russia 8
U.S.Army Russia 28
U.S.M.C. Russia 6
Yugoslavia Russia 1
SQL's are powerful sorting tools but they aren't Google search... they give you exactly what you ask for but you must ask the question exactly right
This
SELECT P2Name, COUNT(P2Name) AS Total
FROM ScenData.db
WHERE( LOWER(p2Name) like "%russia%")
GROUP BY P2Name
Will give you one total..... and that is 87 as P2 ( in my files )
Also, keep in mind that when Sort tables runs it sorts through EVERYTHING in your scenario folders including Any WIP scenarios you might have
Last edited by DRG; March 28th, 2019 at 07:47 AM..
|