Hourly count of Aircraft

Started by lennox2604, October 18, 2009, 04:43:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

lennox2604

Hi

Does anybody have a SQL script which will extract the hourly count of flights.
I have tried to get one up and running but to no avail.

The Mylog only gives for last hour

I have a cunning plan to use the information but first i need to extract it

Any help or script welcome




Aerotower


lennox2604

Missed the point here

What it does NOT do is tell you the number 0000-0100; 0100-0200 thus
18/10/09  0000-0100  4
18/10/09  0100-0200  6

It is just needs extracted from the Mylog not just last 10 minutes and last hour

and i cannot get a SQL statement to do it



Aerotower

had not noticed it. It is not possible to change the time to see the records per hour.
Cumps

tarbat

#4
SELECT
  substr(Flights.EndTime,1,13) AS Date_Hour,
  COUNT(Flights.ModeS) AS Count_of_Flights
FROM
Flights
GROUP BY
  Date_Hour
ORDER BY
  Date_Hour


Gives something like this:



Or you could use the same SQL query on the v_Flights view to get earlier dates.

Terre

Tarbat, a fine script you've made there. I had the idea to handle it with a pivot table but failed as it seems that certain sql commands need to be 'rewritten' to work in sqlite. By far your script is more elegant - Salute!