

 Amazon Redshift will no longer support the creation of new Python UDFs starting Patch 198. Existing Python UDFs will continue to function until June 30, 2026. For more information, see the [ blog post ](https://amazonaws-china.com/blogs/big-data/amazon-redshift-python-user-defined-functions-will-reach-end-of-support-after-june-30-2026/). 

# STV\$1WLM\$1SERVICE\$1CLASS\$1STATE
<a name="r_STV_WLM_SERVICE_CLASS_STATE"></a>

Contains the current state of the service classes. 

STV\$1WLM\$1SERVICE\$1CLASS\$1STATE is visible only to superusers. For more information, see [Visibility of data in system tables and views](cm_chap_system-tables.md#c_visibility-of-data).

## Table columns
<a name="r_STV_WLM_SERVICE_CLASS_STATE-table-columns2"></a>

[\[See the AWS documentation website for more details\]](http://docs.amazonaws.cn/en_us/redshift/latest/dg/r_STV_WLM_SERVICE_CLASS_STATE.html)

## Sample query
<a name="r_STV_WLM_SERVICE_CLASS_STATE-sample-query2"></a>

The following query displays the state for service classes greater than 5. For a list of service class IDs, see [WLM service class IDs](cm-c-wlm-system-tables-and-views.md#wlm-service-class-ids).

```
select service_class, num_executing_queries, 
num_executed_queries 
from stv_wlm_service_class_state 
where service_class > 5
order by service_class;
```

```
 service_class | num_executing_queries | num_executed_queries
---------------+-----------------------+----------------------
             6 |                     1 |                  222
             7 |                     0 |                  135
             8 |                     1 |                   39
(3 rows)
```