Skip to content

Commit

Permalink
Increased limit in logbook statistics from 250 to 1000 rows.
Browse files Browse the repository at this point in the history
  • Loading branch information
albar965 committed Jan 6, 2022
1 parent 28c6334 commit 7b8b120
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/logbook/logstatisticsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,23 +372,23 @@ void LogStatisticsDialog::initQueries()
"select logbook_id, departure_ident as ident, departure_name as name from logbook where departure_ident is not null "
"union "
"select logbook_id, destination_ident as ident, destination_name as name from logbook where destination_ident is not null) "
"group by ident, name order by count(1) desc limit 250"
"group by ident, name order by count(1) desc limit 1000"
},

Query{
tr("Top departure airports"),
{tr("Number of\ndepartures"), tr("ICAO"), tr("Name")},
{Qt::AlignRight, Qt::AlignRight, Qt::AlignLeft},
"select count(1), departure_ident, departure_name "
"from logbook group by departure_ident, departure_name order by count(1) desc limit 250"
"from logbook group by departure_ident, departure_name order by count(1) desc limit 1000"
},

Query{
tr("Top destination airports"),
{tr("Number of\ndestinations"), tr("ICAO"), tr("Name")},
{Qt::AlignRight, Qt::AlignRight, Qt::AlignLeft},
"select count(1), destination_ident, destination_name "
"from logbook group by destination_ident, destination_name order by count(1) desc limit 250"
"from logbook group by destination_ident, destination_name order by count(1) desc limit 1000"
},

Query{
Expand All @@ -399,7 +399,7 @@ void LogStatisticsDialog::initQueries()
Qt::AlignLeft, Qt::AlignLeft},
"select cast(distance * %1 as int), departure_ident, departure_name, destination_ident, destination_name, "
"simulator, aircraft_name, aircraft_type, aircraft_registration "
"from logbook order by distance desc limit 250"
"from logbook order by distance desc limit 1000"
},

Query{
Expand All @@ -414,7 +414,7 @@ void LogStatisticsDialog::initQueries()
"simulator, aircraft_name, aircraft_type, aircraft_registration "
"from logbook "
"where strftime('%s', destination_time_sim) - strftime('%s', departure_time_sim) > 0 "
"order by strftime('%s', destination_time_sim) - strftime('%s', departure_time_sim) desc limit 250"
"order by strftime('%s', destination_time_sim) - strftime('%s', departure_time_sim) desc limit 1000"
},

Query{
Expand All @@ -427,7 +427,7 @@ void LogStatisticsDialog::initQueries()
"select cast((strftime('%s', destination_time) - strftime('%s', departure_time)) / 3600. as double), "
"departure_ident, departure_name, destination_ident, destination_name, "
"simulator, aircraft_name, aircraft_type, aircraft_registration "
"from logbook order by strftime('%s', destination_time) - strftime('%s', departure_time) desc limit 250"
"from logbook order by strftime('%s', destination_time) - strftime('%s', departure_time) desc limit 1000"
},

Query{
Expand All @@ -452,7 +452,7 @@ void LogStatisticsDialog::initQueries()
"cast(sum((strftime('%s', destination_time) - strftime('%s', departure_time)) / 3600.) as double), "
"cast(sum(max(strftime('%s', destination_time_sim) - strftime('%s', departure_time_sim), 0) / 3600.) as double), "
"aircraft_type "
"from logbook group by simulator, aircraft_type order by count(1) desc limit 250"
"from logbook group by simulator, aircraft_type order by count(1) desc limit 1000"
},

Query{
Expand All @@ -464,7 +464,7 @@ void LogStatisticsDialog::initQueries()
"cast(sum((strftime('%s', destination_time) - strftime('%s', departure_time)) / 3600.) as double), "
"cast(sum(max(strftime('%s', destination_time_sim) - strftime('%s', departure_time_sim), 0) / 3600.) as double), "
"aircraft_registration "
"from logbook group by simulator, aircraft_registration order by count(1) desc limit 250"
"from logbook group by simulator, aircraft_registration order by count(1) desc limit 1000"
}
};
}
Expand Down

0 comments on commit 7b8b120

Please sign in to comment.