|Data provider||Read||Finbourne||Provided with LUSID|
Note: The LUSID user running the query must have sufficient access control permissions to both use the provider and read portfolio data in LUSID. This should automatically be the case if you are the domain owner.
Lusid.Portfolio.Return has parameters that help you construct a valid table of data to look up.
toLookUp parameter is mandatory. Use the following data fields in your
select statement to identify the portfolios and returns to look up:
|Required||The scope of the portfolio to look up.|
|Required||The code of the portfolio to look up.|
|Required||The scope of the returns to look up for a portfolio.|
|Required||The code of the returns to look up for a portfolio.|
|Optional||Defaults to |
To list all parameters, their data types, default values, and an explanation for each, run the following query using a suitable tool:
Lusid.Portfolio.Return returns a table of data populated with particular fields (columns). You can return a subset of these fields.
To list all fields available to return, their data types, whether fields are considered 'main', and an explanation for each, run the following query using a suitable tool:
Note: Fields marked 'main' are returned by queries that start
select ^ from Lusid.Portfolio.Return...
We recommend examining the results of every query using the
This field is populated if
Lusid.Portfolio.Return cannot retrieve an entity for some reason. For example, the
Error field reveals that this query:
...fails because a
ReturnScope has not been provided in the lookup table.
Note: For more example Luminesce SQL queries, visit our Github repo.
Example 1: Get all daily performance returns for a particular portfolio
Example 2: Retrieve monthly loss-making portfolios from last year
In this example:
Lusid.Portfolioprovider is used to populate values for
PortfolioCodein the lookup table, and its
whereclause selects the portfolio scope to retrieve portfolio codes for.
@@oneYearAgodemonstrate the use of scalar variables.