question
stringlengths
30
81
sql
stringclasses
48 values
Which base has the highest number of aircraft under the status PMCM?
SELECT location__name, COUNT(*) FROM aircraft WHERE status = 'PMCM' GROUP BY location__name ORDER BY COUNT(*) DESC LIMIT 1;
How many AH-64D have been deployed more than three times at Fort Stewart?
SELECT COUNT(*) FROM aircraft WHERE model LIKE 'AH-64%' AND location__name = 'HAAF' AND remarks LIKE '%deployed%';
How many AH-64D have been deployed more than three times at Huntsville?
SELECT COUNT(*) FROM aircraft WHERE model LIKE 'AH-64%' AND location__name = 'Huntsville' AND remarks LIKE '%deployed%';
How many AH-64D have been deployed more than three times at Fort Campbell?
SELECT COUNT(*) FROM aircraft WHERE model LIKE 'AH-64%' AND location__name = 'CAAF' AND remarks LIKE '%deployed%';
How many AH-64D have been deployed more than three times at Fort Drum?
SELECT COUNT(*) FROM aircraft WHERE model LIKE 'AH-64%' AND location__name = 'WSAAF' AND remarks LIKE '%deployed%';
How many AH-64D have been deployed more than three times at Fort Hood?
SELECT COUNT(*) FROM aircraft WHERE model LIKE 'AH-64%' AND location__name = 'Robert Robert Gray AAF' AND remarks LIKE '%deployed%';
Which base has updated its aircraft records most frequently?
SELECT location__name, MAX(last_update_time) FROM aircraft GROUP BY location__name ORDER BY MAX(last_update_time) DESC LIMIT 1;
What is the total number of NMCM status aircraft for each model at Fort Stewart?
SELECT model, COUNT(*) AS nmcm_count FROM aircraft WHERE status = 'NMCM' AND location__name = 'HAAF' GROUP BY model;
What is the total number of NMCM status aircraft for each model at Huntsville?
SELECT model, COUNT(*) AS nmcm_count FROM aircraft WHERE status = 'NMCM' AND location__name = 'Huntsville' GROUP BY model;
What is the total number of NMCM status aircraft for each model at Fort Campbell?
SELECT model, COUNT(*) AS nmcm_count FROM aircraft WHERE status = 'NMCM' AND location__name = 'CAAF' GROUP BY model;
What is the total number of NMCM status aircraft for each model at Fort Drum?
SELECT model, COUNT(*) AS nmcm_count FROM aircraft WHERE status = 'NMCM' AND location__name = 'WSAAF' GROUP BY model;
What is the total number of NMCM status aircraft for each model at Fort Hood?
SELECT model, COUNT(*) AS nmcm_count FROM aircraft WHERE status = 'NMCM' AND location__name = 'Robert Robert Gray AAF' GROUP BY model;
List all aircrafts and their last mission date at Fort Stewart.
SELECT serial, last_sync_time AS last_mission FROM aircraft WHERE location__name = 'HAAF';
List all aircrafts and their last mission date at Huntsville.
SELECT serial, last_sync_time AS last_mission FROM aircraft WHERE location__name = 'Huntsville';
List all aircrafts and their last mission date at Fort Campbell.
SELECT serial, last_sync_time AS last_mission FROM aircraft WHERE location__name = 'CAAF';
List all aircrafts and their last mission date at Fort Drum.
SELECT serial, last_sync_time AS last_mission FROM aircraft WHERE location__name = 'WSAAF';
List all aircrafts and their last mission date at Fort Hood.
SELECT serial, last_sync_time AS last_mission FROM aircraft WHERE location__name = 'Robert Robert Gray AAF';
Calculate the average hours to phase for all Blackhawks across all bases.
SELECT AVG(hours_to_phase) AS avg_to_phase FROM aircraft WHERE model LIKE 'UH-60%';