---
title: "Lusid.CutLabel"
slug: "lusidcutlabel"
updated: 2024-08-21T10:37:24Z
published: 2024-08-21T10:37:24Z
canonical: "support.lusid.com/lusidcutlabel"
---

> ## 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.

# Lusid.CutLabel

| **Type** | **Read/write** | **Author** | **Availability** |
| --- | --- | --- | --- |
| [Data provider](/v1/docs/what-are-a-data-provider-and-a-direct-provider) | Read | Finbourne | Provided with LUSID |

The `Lusid.CutLabel` provider enables you to write a [Luminesce SQL query](/v1/docs/understanding-the-luminesce-sql-query-syntax) that retrieves information about your [cut labels](/v1/docs/what-is-a-cut-label).

> **Note:** The LUSID user running the query must have sufficient [access control permissions](/v1/docs/creating-policies-to-control-access-to-providers-for-different-luminesce-end-users) to both use the provider *and* read cut label data stored in LUSID. This should automatically be the case if you are the domain owner.

**See also**: [Lusid.CutLabel.Writer](/v1/docs/lusidcutlabelwriter)

## Basic usage

```sql
select * from Lusid.CutLabel where <filter-expression>
```

## Query parameters

`Lusid.CutLabel` has parameters that enable you to filter or refine a query.

To list available parameters, their data types, default values, and an explanation for each, run the following query using a [suitable tool](/v1/docs/what-tools-are-available-to-write-luminesce-queries):

```sql
select FieldName, DataType, ParamDefaultValue, Description from Sys.Field where TableName = 'Lusid.CutLabel' and FieldType = 'Parameter';
```

## Data fields

By default, `Lusid.CutLabel` returns a table of data populated with particular fields (columns). You can return a subset of these fields.

To list 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](/v1/docs/what-tools-are-available-to-write-luminesce-queries):

```sql
select FieldName, DataType, IsMain, IsPrimaryKey, SampleValues, Description from Sys.Field where TableName = 'Lusid.CutLabel' and FieldType = 'Column';
```

> **Note:** Fields marked 'main' are returned by queries that start `select ^ from Lusid.CutLabel`.

## Examples

> **Note:** For more example Luminesce SQL queries, visit our [Github repo](https://github.com/finbourne/luminesce-examples/tree/master/examples).

### Example 1: Retrieve all cut labels

```sql
select * from Lusid.CutLabel
```

### Example 2: Retrieve cut labels of markets which open before 09:00

```sql
select * from Lusid.CutLabel where CutLocalTimeHours < 9 and DisplayName like '%open%'
```

### Example 3: Retrieve cut labels of markets within a certain time zone

```sql
select * from Lusid.CutLabel where Timezone = 'Europe/London'
```

### Example 4: Retrieve all portfolio transactions between London market open and close

You can use cut labels to convert an abstract string time, such as `LondonClose`, to a fixed datetime. This can then be passed into another provider to retrieve data with the same effective datetimes as your cut labels.

```sql
@@fromDT = select Previous from Lusid.CutLabel where Code = 'LondonOpen';
@@untilDT = select Next from Lusid.CutLabel where Code = 'LondonClose';

select * from Lusid.Portfolio.Txn where 
PortfolioScope = 'Finbourne-Examples' and PortfolioCode = 'UK-Equities'
and FromEffectiveAt = @@fromDT and UntilEffectiveAt = @@untilDT
```
