The transcript shows a summary of each result, but LumiCode can take you much further without writing another query: browse every row, group the rows with exact totals, see the spread of each numeric column, or draw a chart straight into the transcript. Each of these works on the whole result, however large, not just the rows on screen.
Prerequisites
LumiCode installed and signed in. See How do I install LumiCode?
A query that has just run, or past results loaded with
/results. See How do I find and re-run a past query?
For the examples here we will use:
select [TableName] ,[FieldName] ,[FieldType] ,[DataType] ,[IsPrimaryKey]
from Sys.Field
where TableName in ('Sys.File', 'Sys.Connection', 'Sys.Field', 'Sys.Registration')select [TableName], [FieldType], [DataType], Count(*)
from Sys.Field
where TableName in ('Sys.File', 'Sys.Connection', 'Sys.Field', 'Sys.Registration')
group by 1, 2, 3Methods
Method 1: Browse every row with /rows
Type /rows and press Enter. LumiCode opens a grid of the last result.
Key | What it does |
|---|---|
Arrow keys | Move between rows, and move the column cursor ( |
Enter | Open the current row in full, one field per line |
| Sort by the column under the cursor |
Shift+ | Add the column to the sort, after any already sorted. Press again to reverse it, and again to remove it. |
| Choose which columns are shown |
| Filter the rows with SQL, for example |
Esc | Clear the filter, then leave |
In a row opened in full, press [ and ] to move to the previous or next row, and c to copy the marked field's value. Press Enter on a field to read a long value in full.

Method 2: Group the rows with /group
Type
/groupand press Enter.Choose the column to group by. LumiCode offers the likeliest answer first, so you can press Enter to accept it. Add more levels to nest groups inside groups.
Choose the figures to show for each group. Every group shows
#, its number of rows. A numeric column can also showsum,avg,min,max,medianand a count of distinct values. A date column can showminandmax.
LumiCode shows one line per group. Press Enter to open or close a group. The totals are worked out on the server over every row in the group, so they are exact.
A date level can be grouped by year, year and month, week or hour. To show months inside years, use the same date column twice.
Repeat a grouping
Name the columns to skip the questions, for example /group TableName DateType max:IsPrimaryKey.
A plain column name is a level, sum:SomeValue is a figure, and SomeDate:year groups a date by year. The Up arrow then repeats the whole grouping.


Method 3: Summarise numeric columns with /stats
Type /stats and press Enter. For every numeric column, LumiCode shows the minimum, median, maximum and average, with a sparkline of the values. The figures cover every row. This requires at least one numeric field in the result.

Method 4: Draw a chart with /chart
Type
/chartand press Enter.Choose the kind of chart.
Choose the column to group by and the column to measure. LumiCode offers the likeliest answer first each time, and Esc steps back a question.
LumiCode draws the chart into the transcript, beside the query. The line above the chart says what it shows and anything it left out.
To show | Use |
|---|---|
A total per category |
|
What each total is made of |
|
Two categories side by side |
|
Shares of a total |
|
The spread of values in each category |
|
A measure per day |
|
A running total built up step by step |
|
The gap between two measures |
|
How values are distributed |
|
Two categories crossed |
|
One value against another, or over time |
|
To see an example of every kind, type /chart gallery. No query is needed.
To skip the questions, name the kind and the columns, for example /chart bar ResourceType Requests. A column whose name contains a space has to be chosen from the questions instead.


Troubleshooting
Lines and scatter plots show blanks or boxes
Line and scatter charts use braille dots, which some terminals and fonts can't draw. Run /set chart-dots blocks to use blocks instead.
A chart loses its colours in a saved transcript
Markdown can't hold colours. Use /transcript html to save a session with charts in it.