# FIRSTWITHTIME

Returns the value of `dataColumn` with the smallest `timeColumn` value where:

* `timeColumn` is used to define the time of `dataColumn`, which can be of type `TIMESTAMP`, `INT`, `LONG`
* `dataType` specifies the type for `dataColumn`, which can be `BOOLEAN`, `INT`, `LONG`, `FLOAT`, `DOUBLE`, `STRING`

## Signature

> FIRSTWITHTIME(dataColumn, timeColumn, 'dataType')

## Example

This example is based on the [Streaming Quick Start](https://docs.pinot.apache.org/release-1.1.0/basics/getting-started/quick-start#streaming).

```sql
select FIRSTWITHTIME(group_name, __metadata$recordTimestamp, 'STRING')
from meetupRsvp 
```

| value                 |
| --------------------- |
| group\_name1016303453 |
