--- title: "How do I explore, group and chart results?" slug: "how-do-i-explore-group-and-chart-results" updated: 2026-10-23T12:22:23Z published: 2026-10-23T12:22:23Z canonical: "support.lusid.com/how-do-i-explore-group-and-chart-results" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # How do I explore, group and chart results? 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?](/v1/docs/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?](/v1/docs/how-do-i-find-and-re-run-a-past-query) For the examples here we will use: ```sql select [TableName] ,[FieldName] ,[FieldType] ,[DataType] ,[IsPrimaryKey] from Sys.Field where TableName in ('Sys.File', 'Sys.Connection', 'Sys.Field', 'Sys.Registration') ``` ```sql select [TableName], [FieldType], [DataType], Count(*) from Sys.Field where TableName in ('Sys.File', 'Sys.Connection', 'Sys.Field', 'Sys.Registration') group by 1, 2, 3 ``` ## Methods ### 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 (`▸` in a heading) | | Enter | Open the current row in full, one field per line | | `s` | Sort by the column under the cursor | | Shift+`s` | Add the column to the sort, after any already sorted. Press again to reverse it, and again to remove it. | | `c` | Choose which columns are shown | | `/` | Filter the rows with SQL, for example `strftime('%Y-%m', SomeDate) = '2026-06'` | | 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. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-FHGHRZKR.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A16%3A41Z&se=2026-11-18T20%3A16%3A41Z&sr=b&sp=r&sig=B8zxixOU9Z%2FQ%2FvVRt8gVkQ9c1E5huWPd03YRA6TcELs%3D) ### Method 2: Group the rows with /group 1. Type `/group` and press Enter. 2. 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. 3. Choose the figures to show for each group. Every group shows `#`, its number of rows. A numeric column can also show `sum`, `avg`, `min`, `max`, `median` and a count of distinct values. A date column can show `min` and `max`. 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. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-B9P7HCI6.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A16%3A41Z&se=2026-11-18T20%3A16%3A41Z&sr=b&sp=r&sig=6mIAfofxpFbwiNtk3Hgy%2F3u%2B4ppe6asZmH0nTbwZUIM%3D) ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-QNUTJMKM.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A16%3A41Z&se=2026-11-18T20%3A16%3A41Z&sr=b&sp=r&sig=ymXsd2bpsi1KiXwF9cMU7yNjuSdOKDyJ00gg6OcHWvA%3D) ### 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. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-TPF7MK7M.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A16%3A41Z&se=2026-11-18T20%3A16%3A41Z&sr=b&sp=r&sig=vb3Osjh2AgpmzjCBBKZfQc%2BmUNPIgmxe8mF3zOxqf0Q%3D) ### Method 4: Draw a chart with /chart 1. Type `/chart` and press Enter. 2. Choose the kind of chart. 3. 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 | `column` (vertical, for a sequence) or `bar` (horizontal, for a ranking) | | What each total is made of | `stacked` | | Two categories side by side | `grouped` | | Shares of a total | `pie` or `treemap` | | The spread of values in each category | `boxplot` | | A measure per day | `calendar` | | A running total built up step by step | `waterfall` | | The gap between two measures | `dumbbell` | | How values are distributed | `histogram` | | Two categories crossed | `heatmap` | | One value against another, or over time | `line`, `scatter` or `multiline` | 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. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-8WQIW1JH.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A16%3A41Z&se=2026-11-18T20%3A16%3A41Z&sr=b&sp=r&sig=QoxQmNTBg2SJ8qmbTnm8lv1JpuT2oxmZ15T3Jbujg28%3D) ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-025MLV7W.png?sv=2026-02-06&spr=https&st=2026-11-18T19%3A16%3A41Z&se=2026-11-18T20%3A16%3A41Z&sr=b&sp=r&sig=BcjEkj%2FaXmCugBtnh1MBHaqHzwCdX0nvtQNDKqmorEE%3D) ## 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.