In about fifteen minutes, you'll find a provider, write and run a query, explore and format the results, then save the query and export the results to Excel, all in your browser. Along the way you'll meet the parts of the Luminesce Query Editor you'll use every day. The examples query Luminesce's own catalogue, so they work in any LUSID domain.
Prerequisites
Access to the Luminesce Query Editor in the LUSID web app, under Data Virtualisation > Query Editor.
Permission to query the
Sys.Fieldprovider, which lists the fields of every provider in your catalogue.
Step 1: Open the Query Editor
Sign in to the LUSID web app and select Data Virtualisation > Query Editor.
Select + above the editor, then New Tab. Each tab holds a query of its own, with its own results, so you can keep this one separate from anything else you're working on.
The editor, where you write SQL, is in the middle. The Catalogue, which lists what you can query, is on the right, and the results appear under the editor. For a full tour of the screen, see Understanding the Query Editor workspace.
Step 2: Look up a provider
Before you write a query, it helps to know what you can query.
In the Catalogue, type
Sys.Fieldin Search.Open the Sys folder and select Sys.Field to see its fields.
Hover over
TableNameandFieldTypeto read their descriptions.TableNameis the name of a provider, andFieldTypesays whether a field is a column or a parameter.
Every provider you can use is in the Catalogue, with its fields and documentation. See How do I find providers and fields in the catalogue?
Step 3: Write and run a query
This query counts the columns of each Lusid.Instrument provider in your catalogue:
select TableName, count(*) as Columns
from Sys.Field
where TableName like 'Lusid.Instrument%' and FieldType = 'Column'
group by TableName
order by Columns descType it into the editor rather than pasting it, to see autocomplete at work. As you type
from Sys.F, the editor offers the matching providers. Press Enter or Tab to accept one, or Ctrl+Space to bring the list back (or to get it in the first place if auto-complete option is turned off). It does the same for fields, functions and keywords.Select Run, or press Shift+Enter.
The status beside the toolbar shows In progress while the query runs, then Succeeded, and the results appear under the editor. If you've mistyped something, the editor underlines it; fix it and run the query again.

Step 4: Explore the results
The grid holds every row of the result, however many there are.
Select the Columns heading to sort by it. Select it again to sort the other way.
Select the filter icon beside the box under the Columns heading, choose Greater than and type
20. Only the larger providers are left, and the row count beside Results changes to match. Select Filters on the toolbar, then Clear all, to show every row again.Drag across a few cells in the Columns column. The bar under the grid shows their sum, average, count, minimum and maximum.
See How do I filter, group and total results?
Step 5: Make the results easy to read
First, colour the largest providers so they stand out:
Hover over the Columns heading, select its menu icon, then Conditional formatting.
Select Add rule. Leave Based on as Columns, choose is greater than and type
160.For Apply to, choose Cell fill, then Green.
Select Apply.
Then add a total under the grid:
Open the Columns side bar on the right of the grid.
Drag Columns into Aggregations (groups / footer).
On its pill, select the function and choose Sum.
The footer now shows the total number of columns across every provider in the result.

Step 6: Change the query and run it again
In the editor, change
'Lusid.Instrument%'to'Lusid.Portfolio%'.Press Shift+Enter.
The results now count the columns of the portfolio providers. Your colour rule and footer total stay with the tab, so they apply to the new results too.
To run just part of a longer query, highlight it before you press Shift+Enter. See How do I run a query and follow its progress?
Step 7: Save the query
Select Save.
In the Save query dialog, choose My Workspace, type
tutorialsas the Group andColumns per provideras the Item Name.Leave Save formattings ticked, so the colour rule and total are saved with the query.
Select Save.
The tab now has the query's name. Next time, select +, then Saved Queries, to open it, and its results look just as you left them. To share a query with your team, save it to a shared workspace instead. See How do I save, open and share queries?
Step 8: Export the results to Excel
Select the export button (a cloud with a downward arrow) in the toolbar above the grid.
Under File type, choose Excel.
Leave everything under Include ticked, so the workbook keeps the sorting, the green cells and the total.
Check the File name, which starts as the query's name, and select Export.
Your browser downloads the workbook. Open it, and it looks just like the grid. You can also save the file to Drive from the same panel. See How do I copy and download results?

Step 9: Ask Candela about the query
Candela is FINBOURNE's AI agent.
Select the Candela button on the toolbar to open the Query Editor Assistant.
Turn on add query beside the prompt, so Candela can see the query in your tab.
Type
What does this query tell me?and send it.
Candela explains the query. Try asking it for another one, for example Which Lusid providers have the most parameters?, and select Add to query editor to put its answer in the editor, ready to run. See How do I use Candela in the Query Editor?
Note: Candela is currently available to some customers only. Everything else in this tutorial works without it.
What's next
Understanding the Query Editor workspace explains every part of the screen.
A tour of the Luminesce Query Editor shows what else it can do, one screen at a time.
How do I write queries faster in the Query Editor? covers autocomplete, keyboard shortcuts and the designers.
How do I schedule a Luminesce SQL query? runs a query by itself, every morning or on any timetable.
Getting started with Luminesce: Retrieving a portfolio valuation is a second tutorial, using LUSID's own portfolio data.
Getting started with LumiCode, for LumiCode