Skip to content

Queries, and everything you can do with them

Most people meet a query, run it, look at the answer, and close it. That is a fair use — but it is perhaps a fifth of what the results screen can do.

Here is the rest.

Running one

A query is a saved question. Pick it from the Query list and press Run.

If it needs to know something first — an academic year, a term, a teacher, a school — you are prompted. Those parameters can be dropdowns that search as you type, and one can narrow another, so choosing an academic year leaves only that year's weeks in the next box. A pair of dates can be offered as a named preset instead, so you pick "This Term" rather than working out the dates yourself.

There are two ways to run. Run shows the results here; Run In New Window opens them in a new browser tab — the easy way to compare last term with this one side by side.

Shaping the answer

Now the useful part. Everything below happens instantly, in your browser, on the results you already have. Nothing goes back to the database, and none of it changes the saved query — so you cannot break anything by experimenting.

Show only the columns you care about. The Columns button lists them all with tickboxes.

Filter any column. Type into the box under a heading for a match-anywhere search, or pick a value from the dropdown of what is actually there. There are options for the awkward cases too — (Blanks), (Non Blank), and on numbers (Zero), (Non Zero), (<0), (>0). You can also just type >100 or <=50.

For anything more involved, Custom Filter Selection lets you build several conditions and combine them with And and Or, including groups inside groups. It shows you a plain-English summary of what you have built as you go.

One thing worth knowing: filtering works on the whole result, not just the page you can see. Filter five thousand rows down to twelve and you get all twelve.

Total a column. Numeric columns have a Σ button offering Sum, Max, Min or Average, shown in a totals row underneath. It totals the filtered rows — so filter to one teacher, and the total is theirs.

Reshaping it completely

Three more tabs sit alongside the results, and each takes the same rows somewhere different.

Group By collapses rows into groups with totals — a list of individual lessons becomes one row per teacher with their total minutes.

Pivot lays the data out in two dimensions: instrument down the side, term across the top, a count in the middle.

Visual draws it as a bar, line or pie chart, which you can save as an image or print.

See Group By, Pivot and Charts.

Keeping what you built

Having set a view up, you do not have to do it again.

Export to Excel or to CSV takes exactly what is on screen — your columns, your filter — not the raw query output.

Save as Report keeps the whole arrangement as a named report: the columns, the filter, and whichever tab you were on. Save from the Visual tab and it comes back as a chart.

Save as Dashboard Item turns it into a tile you can put on a dashboard, with its parameters fixed so it never asks again.

Making it do something

Two features go beyond looking.

Send Email — a query set up as a Marketing List can email every row of its result. Every parent of a pupil starting next term, every teacher whose DBS is expiring. Any column can be merged into the message, so Dear {FirstName}, does what you would expect.

Alerts — set a threshold on a query's row count and Xperios watches it for you. "Tell me when this returns more than zero" turns a query you keep remembering to check into one that tells you when it matters.

The point

One query is worth writing because it is worth reusing. The same saved question can be a spreadsheet on Monday, a chart in a meeting on Tuesday, a tile on a dashboard all term, and an alert that goes off in November.

If there is something you find yourself checking by hand every week, it is probably a query — and probably one that already exists.


Read next: Reports: from a screen to something you can send

Paritor - Winslade Park, Manor Drive, Clyst St Mary, EX5 1FY